Updates on responsive images in posts?

Any update on actually having responsive images inside of posts?

This works fine but should not be needed.

For any blog heavy on images this is really important especially on mobile and/or low bandwidth.

You can configure all the image sizes you want in the theme configuration:

These sizes can be accessed in the theme. Also any images uploaded to the content will have all these sizes added to the srcset attribute of the image. Hope this helps!

Yep, I understand how to do it for the featured image but this does nothing for the majority of the images in posts.

Why is this template not used for the gallery images? Seems like that should be default or at least allow a partial to be created for the galleries so we can do it ourselves.

Kevin did a pretty good job of answering that question in the thread you linked to :slight_smile:

Yes, he did but that post is nearly a year old now.

Ghost’s own blog isn’t using responsive images correctly. Each url in the srcset is the same at 2000px.

I notice that if you put in a non-valid size it redirects to the full size image. Why not just make the config sizes the source of truth and fail fast? I’m not sure if the sizes are generated in advance or on the fly but either should be handled with new config changes?

1 Like