I find that many designers (especially those coming from print) don’t really understand how resolution works on the web, so I’d like to explain it. These concepts apply to whatever design app you use (Photoshop, Sketch, Adobe XD, Illustrator, etc.) and understanding this will help you create properly sized web graphics.
If an image will be coded into a space of 300 pixels, you have to make:
A 300 pixel wide image (for 1x displays).
A 600 pixel wide image (for 2x displays).
In a webpage, both images will be coded so they appear physically the same size, but the 2x image has more pixels squeezed into that space (so it appears sharper and more detailed).
NOTE: The resolution you see in Photoshop (such as 72ppi) is ignored by web browsers and is therefore irrelavent. It does not matter what the resolution is set to (so just make it 72ppi). All that matters is the pixel width and height of your images!
Ever tried to pinch-to-zoom on a website and been annoyed that you can’t? Sadly this is something the website disabled on purpose. There’s a line of code they added to the webpage to prevent zooming. As a web developer I don’t believe in doing this, because it’s a major hindrance to many readers. Luckily there’s a workaround. You can make a bookmarklet that will let you enabling zooming on any website!