Tutorial Wagtail Version: 2.x
In the previous lesson we created a custom Django Rest Framework Serializer to output JSONified image data in the Wagtail v2 API, including the URL, title, height and width. In this tutorial I'll show you how to to do the same thing but in one line of code using a built in Wagtail class.
This is actually so easy to do, it's hard to write a tutorial for it. So I'm going to leave this tutorial as a chunk of code (mainly) and if you need more details, this tutorials video, along with the previous video, will give you everything you need to create a successful Image Rendition in your Wagtail v2 API output.
Headless CMS: Custom Wagtail Image Serializer
Posted on
Using Django Rest Framework with Wagtails v2 API, we can customize ANY field the way we want. In this short video, we take a look at creating a new field entirely by overwriting an image, but we also look at serializing (JSONifying) an image field from a ForeignKey inside an Orderable. Don't worry, it's not as crazy as it sounds!
Headless CMS: Serialize a Custom Image Chooser Block
Posted on
Learn how to serialize an ImageChooserBlock in your StreamFields to output the image data you're looking for.
Headless Workshop (with Vue.js)
Posted on
Learn how to create a headless Wagtail website using Vue.js — from scratch
Headless CMS: Serializing Foreign Keys
Posted on
Wagtail Page's can have ForeignKeys to other pages. In this tutorial you'll learn how to return better ForeignKey data in your Headless Wagtail CMS website.
This course covers everything from basic installation to advanced features like custom blocks and API integration, it's perfect for developers looking to enhance their skills with this powerful CMS.