Is it possible to format via img_url for images included in content added via Editor?

I’m looking at that feature and trying to change the image format to serve it to the user.

I modified the img_url that exists in the hbs file of the theme as suggested in the guide, and in that case, it is being sent to the user as an avif file or webp file as normal.

However, it doesn’t seem to work for images added via the editor (both snippet and pasting images from the editor).

I have not been able to find any relevant information or code on this either.

How is it possible to send webp, avif conversion even for images located in content? Is there a separate hbs file for figure kg-image-card?

Thank you.

  • environments
    Ghost 5.78.0
    Theme : Casper

Images added via the editor are automatically served compressed and responsively (that is, different sizes for different screen sizes). They aren’t served via different formats, though.

The img_url helper is only for images used by the theme, not images used in the editor.

1 Like

I looked it up a bit more while you were answering, and it looks like that part is handled by koeing editor, so sadly it would be difficult to handle separately. and can not use img_url helper in this section.

Thank you for reply.

1 Like