Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support image renditions from HTML documents #136

Closed
fluffy-critter opened this issue Oct 15, 2018 · 1 comment · Fixed by #162
Closed

Support image renditions from HTML documents #136

fluffy-critter opened this issue Oct 15, 2018 · 1 comment · Fixed by #162
Assignees
Labels
enhancement New feature or request html Issues pertaining to HTML handling images Stuff to do with image renditions

Comments

@fluffy-critter
Copy link
Collaborator

Expected Behavior

HTML documents don't currently support img files that are stored within the content tree, and any img src links need to be manually managed to whatever renditions are in use. What would be nice is if the HTML page renderer were to minimally process the document to treat <img> elements similarly to ![]() in markdown.

On local images, attributes such as width and height would drive the rendition, and additional parameters could be passed in via data-publ-* attributes (e.g. data-publ-scale="3").

Remote and static images would simply rewrite the src attribute appropriately but make no other changes.

@fluffy-critter fluffy-critter added the enhancement New feature or request label Oct 15, 2018
@fluffy-critter fluffy-critter added html Issues pertaining to HTML handling images Stuff to do with image renditions labels Jan 4, 2019
@fluffy-critter
Copy link
Collaborator Author

fluffy-critter commented Jan 9, 2019

This should also probably respect the rendering configuration passed in through entry.more et al, and obviously should set srcset if it's not specified. (However, parsing srcset is probably above and beyond what we want to do.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request html Issues pertaining to HTML handling images Stuff to do with image renditions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant