This relates to #4574 and #3949
Also, see
There are lots of stuff here I have not thought through, so I just throwing the ideas down on paper. But people will probably want to do some image processing of the images they refer to in Markdown. I guess we could:
I like the filename convention a lot. It gives editor control.
Ideally this could be mapped with predefined processing sets so editors can only choose between a few “processing sets” defined by the project/theme creator.
Blue sky for this:
glob pattern setting defines defaults.
Filename convention allow default overwrite by editors using predefined processing set.
Note to self:
Doing this work, we might take it the extra mile, and add some support for srcset to potentially create images in different sizes.
Note to self:
Doing this work, we might take it the extra mile, and add some support for srcset to potentially create images in different sizes.
If you're going to do the above, it would also be very useful if we could have the ability to add a class attribute to Markdown images through the config (for CSS and lazy loading purposes).
If you're going to do the above,
How is that related to the above?
How is that related to the above?
Ok. It's not related to this particular issue of image processing Markdown images.
But I just thought that if you're going the extra mile to add a srcset attribute to these images through Hugo, a class attribute would complement the feature.
It was mentioned in another thread that we could use HTML (or rather SGML) processing instructions to do this, and that this should be possible to extract from Blackfriday's AST
<?hugo command="Fit" options="400x300" ?>
Or something like that. It that works, It would be totally usable. The above will turn into a HTML comment when viewed on GitHub. And if we're careful about how we create the syntax above it should be a fairly easy search-replace transition once CommonMark gets some kind of standard.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Is there still a plan to support this? I would love to have native srcset support in Hugo :)
No, this is supported via the Markdown Render Hooks.
Most helpful comment
Note to self:
Doing this work, we might take it the extra mile, and add some support for
srcsetto potentially create images in different sizes.