Hi,
Ghost supports Responsives images on image card.
I could be genious to support responsive images on Markdown cards !
Regards,
Hi,
Ghost supports Responsives images on image card.
I could be genious to support responsive images on Markdown cards !
Regards,
Itās a difficult one to implement. Weāre able to generate srcset
and sizes
for image and gallery cards because they allow metadata about the image to be stored inside the mobiledoc document format. Markdown doesnāt let you do that unless you break away from cross-compatible markdown which would largely work against the intention of the markdown card.
The responsiveness is a rendering issue linked to the theme used and not the post content. Itās not a mobiledoc issue, isnāt it ?
What about to let the image as is in the mobile doc and let the rendering resizes the images and provides images sizes regarding the theme used ?
Thank-you Kevin.
The responsiveness is a rendering issue linked to the theme used and not the post content.
No, themes have no control over the post content rendering. Post content is rendered to HTML when the post is saved to keep front-end and API requests fast through not needing to render on the fly.
What about to let the image as is in the mobile doc and let the rendering resizes the images and provides images sizes regarding the theme used ?
Sorry, Iām not sure what this means, can you re-phrase?
The Koenig rendering motor could take into parameters the theme settings in terms of image resolution supported ?
The html could be regenerated each time a theme is changed based on the Mobiledoc document that contains the original Markdown ?
Iām trying to find a solution to accelerate the mobile rendering of my blog on long posts
That side of things isnāt the problem, srcsets use system-defined sizes that arenāt affected by themes. The issue is having access to the image dimensions so that we can output the correct set of srcset/sizes that work within the available system sizes. Image and gallery cards store that metadata within mobiledoc, markdown has no equivalent.
The other solution could be to add a āloadind=lazyā attribute on all post images generated by the markdown
Image Lazy Loading plugin for Markdown-it by ltoinel Ā· Pull Request #156 Ā· TryGhost/Koenig Ā· GitHub
It could save me some performance Warning on large posts (+ support new image format).