Images inserted via Gutenberg don't have width & height attribute by default. I'd like to use those for lazy-loading purposes so image is positioned correctly.
Is there a hook or something to add width and height to output? Or should one extend the core block for this?
Images inserted via Gutenberg don't have width & height attribute by default. I'd like to use those for lazy-loading purposes so image is positioned correctly.
Is there a hook or something to add width and height to output? Or should one extend the core block for this?
If affordable i would rather switch to a lazyload technique without the need of width and height attributes on images over somehow hacking of the editors image output.
This saves you maintenance problems that may occur in the future with Gutenberg Editor.
i do made good experiences with this plugin https://appelsiini.net/projects/lazyload/
edit:
i'm wrong with my assumption. you would need to edit the image output for another plugin anyway. like for my suggested one with data-src
to an image.