-
Notifications
You must be signed in to change notification settings - Fork 1
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
Image component improvments #538
Comments
You can currently set the height and width of the image from the design section, which will stop the layout shifts from happening. We are currently working on adding the loading attribute to the image component, expect that soon. For the height auto/100% question, I wasn't able to reproduce the stretching you have in your screenshot. Could you share how you got that with having the height of the image set to 100%? |
Hi there, this is a column component, rich text on the right, with image in the left. If the right hand columns height exceeds the left the stretching occurs - setting the image height to auto resolves this. |
With regards to the layout shift, sometimes you want a fluid responsive image (ie - width: 100%) with the width and height attributes still set on the element. This should remove layout shift for responsive images too. |
Hey @sami616, we've recently made updates to help improve these problems for relative height/width images and other elements. Could you please upgrade your app to the latest Experiences SDK version and let us know if you're still having these issues? Thanks! |
I'm noticing some layout shift with images loading (using the ootb image component)
width
/height
attributes to the element to prevent this?loading="lazy"
option for the image component too?The text was updated successfully, but these errors were encountered: