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
I don't get the height and width attributes. This is what's written in the docs related to responsive images:
Use original image width/height for responsive images (when using sizes)
In our case, we want the original image from the image provider to be cropped to a fixed ratio. Therefore, we cannot use the original image height. Should we calculate the height ourselves based on ratio and width? Wouldn't it be handy if there would be a ratio or aspect-ratio prop which can replace height?
Also, is it really ok to use a fixed image width and height which is only reflecting the aspect ratio but not really the correct image size (since this can be smaller)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I don't get the
height
andwidth
attributes. This is what's written in the docs related to responsive images:In our case, we want the original image from the image provider to be cropped to a fixed ratio. Therefore, we cannot use the original image height. Should we calculate the height ourselves based on ratio and width? Wouldn't it be handy if there would be a
ratio
oraspect-ratio
prop which can replaceheight
?Also, is it really ok to use a fixed image width and height which is only reflecting the aspect ratio but not really the correct image size (since this can be smaller)?
Beta Was this translation helpful? Give feedback.
All reactions