You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the chapters might have a lot of graphics. If possible we should add native lazy loading for the chapter graphics (except for the chapter heading and the logo).
I'm not sure that is possible as we are writing in markdown and using showdown to convert to HTML and it doesn't look to have an option to add attributes to image tags.
Could do a bulk edit for image tags in body section at end of chapter generation but that sounds kind of hacky...
Easiest option might be to change all images in chapter markdown to native HTML instead of markdown? Once-off pain for long term gain?
Yeah I think this would be a nice improvement. Best approach IMO would be to implement this in the markup generator, since we want to encourage authors to write simple markdown like ![foo](./img.png).
I think the simplest would be to implement it the same way as the generate_figure_ids with a nifty regex replace and add in the loading="lazy" attribute. I can have a go at it a little later.
Some of the chapters might have a lot of graphics. If possible we should add native lazy loading for the chapter graphics (except for the chapter heading and the logo).
I'm not sure that is possible as we are writing in markdown and using showdown to convert to HTML and it doesn't look to have an option to add attributes to image tags.
Could do a bulk edit for image tags in body section at end of chapter generation but that sounds kind of hacky...
Easiest option might be to change all images in chapter markdown to native HTML instead of markdown? Once-off pain for long term gain?
Thoughts @rviscomi , @mikegeyser ?
The text was updated successfully, but these errors were encountered: