nhoizey’s avatarnhoizey’s Twitter Archive—№ 117,341

  1. How do you deal with images that need to have a fluid width but fixed height? I tend to start from the lowest width/height ratio and increase, knowing larger images will have hidden parts above and below… 😔 Anything better? nicolas-hoizey.com/notes/2022/10/12/1/
    1. …in reply to @nhoizey
      For example, if the image height is fixed at 200px, and the width varies from 400 to 800px: <img srcset=" 400x200.jpg 400w, 600x300.jpg 600w, 800x400.jpg 800w" sizes="…" src="…" alt="…" /> When 800px wide on 1dppx, half the image is hidden… 😭