After finishing a design in Sketch, I have 3 unique layouts with header images displayed below:
https://i.sstatic.net/fG5T3.png
To ensure the height is consistent and to crop the image appropriately on different devices, I export the following images from Sketch:
dog-header-mobile-1x.png
dog-header-mobile-2x.png
dog-header-mobile-3x.png
dog-header-mobile-4x.png
dog-header-tablet-1x.png
dog-header-tablet-2x.png
dog-header-tablet-3x.png
dog-header-tablet-4x.png
dog-header-desktop-1x.png
dog-header-desktop-2x.png
dog-header-desktop-3x.png
dog-header-desktop-4x.png
I aim to use the appropriate 1x, 2x, 3x, and 4x images for each device. However, with 3 different images for the 3 devices, I'm unsure if I should utilize srcset
AND sizes
. It feels like a complex way of handling this task and I suspect there might be a simpler method that I am overlooking.