I'm curious about the best practices for sizing images when using media queries. Should I use percentages, pixels, ems, rems, or viewport units like vw/vh? I currently use pixels to resize images for larger screens (min-width: 1000px), but I feel like there's a better approach. What do you all recommend?
1 Answer
Honestly, the best approach is usually to set your images to 100% width of their container. This way, they automatically adjust to fit the viewport without overflowing. It's a simple and effective method to keep images responsive across different device sizes!
So just width: 100% and height: auto, right?