mai 26, 202210:22 AM - editado mai 26, 202210:58 AM
Colaborador(a)
The default "Image" module doesn't add height and width attributes to HTML
The default "Image" module is not adding image width and height to be part of my HTML. How could I add that behaviour? Shouldn't it be part of it already, especially as HubSpot needs the height and width attribute for automatic image resizing? (as mentioned here: https://knowledge.hubspot.com/files/automatic-image-resizing-on-hubspot-content)
If you are looking to control the height and width from the backend and not allow the content editor control, you would want to combine this image field with the
So my options are to to either use exact width and height (I'm not a fan of that), or a custom module? I would do a custom module but the site is already live with hundreds of images and it would take too long to switch every single image from the default image module that cannot be modified by a developer to a custom one.
I do feel like the default image module should already add the height and width to be part of the image HTML without any developer interference, especially as those are needed for generating the "srcset" attribute images for different device screen widths.