jekyll-cloudinary icon indicating copy to clipboard operation
jekyll-cloudinary copied to clipboard

Provide a filter that can make standard images in a content responsive

Open nhoizey opened this issue 7 years ago • 2 comments

It would be really useful to be able to write {{ post.content | cloudinary: presetName }} so that we can use different presets on the same content, in different layout places.

Currently, using {% cloudinary presetName image.jpg %} inside Markdown content means we can chose only one preset for each image, whatever the place it is inserted in layouts.

This filter would also enable writers to use Markdown's native image syntax in WYSIWYG tools.

Would this make sense?

nhoizey avatar Nov 29 '18 16:11 nhoizey

What use cases are we targeting here?

Should we be able to link a preset to a layout in defaults config or in layout's front matter while keeping basic Markdown and having a hook apply the corresponding transformation?

DirtyF avatar Dec 04 '18 21:12 DirtyF

I would like to be able to use multiple presets in one single layout, because different parts of the layout can have different responsive image needs.

So I think a Liquid filter would be the best option.

nhoizey avatar Dec 19 '18 20:12 nhoizey