Website image size guidelines 2021 – Updated: 04 February, 2021

The topic of resizing images for the web is a relatively unproblematic, nonetheless ridiculously complex i, at the aforementioned time. And information technology's also one where at that place is an awful lot of misinformation floating effectually, even from professionals. Simply a lot of people have a need for basic foundational skills when it comes to understanding and resizing digital images for diverse purposes. Hence this post…

Huge caveat here: My primary field of knowledge is in photography. I take been fiddling with cameras my whole life, and accept taught photography and digital imaging at local colleges and independently for the last 10 years (visit iTeachphotographers for more on that), and I feel like I have a  reasonably authoritative voice on the topic. I also design, host and maintain WordPress websites. While I can read and write HMTL and CSS, I am more a designer than a coder, and I don't profess to exist know everything about the technical intricacies of web design. And I certainly don't profess to knowing everything there is to know well-nigh pixels either, particularly about pre-press and the printing manufacture. So if, in spite of my feel and research, I am misinformed or mistaken nearly some point or other, I welcome any corrections.

But Pixels Matter

Pixels

This is a great starting point. Digital imaging capture devices (aka cameras, only also scanners) have a fixed number of pixels they can capture in 1 image. A Canon EOS 5D MkIII for case can capture an epitome at 5,760 x 3,840 pixels. If we multiply those together we get 22,118,400 pixels, which reflects that it is a 22 Megapixel camera (22 million pixels).

A Nikon D800 captures a whopping seven,360 × 4,912pixels (a 36.3MP camera). The top of the line Phase One Digital Photographic camera dorsum, the IQ180, captures a staggering 10328 x 7760 pixels (over 80 1000000 pixels!). And so, pixels are finite and are linked to the capture device. Pixels are our starting betoken. They are the raw textile of our images, whether we are are printing or just displaying the image on a screen.

The other main role player in the story is resolution. Resolution has many dissimilar meanings, and is quite circuitous when you await into it. Broadly speaking though, resolution is basically referring to the detail an paradigm has. The higher the resolution, the more detail there is. Just in this article, the main blazon of resolution concept I desire to introduce is chosen pixels per inch, otherwise known equally ppi. The best way to remember about how resolution works together with the number of pixels captured in an image, is that "the number of pixels is determined past the capture device, simply pixels have no fixed size". A pixel is a unit of a digital image, but overall resolution depends upon the size of the pixels (and the viewing distance). The smaller the size of a pixel, the college the resolution of the image will exist and the clearer the image will be.

PPI vs DPI

Before we go whatever further, I think it'due south important to clarify the frequently misused terms dpi and ppi. DPI is a printing term, and it stands for DOTS PER INCH. Printers lay their ink downwardly in dots, and this figure is not the same as PPI. Dots take space in between them, and pixels don't. DPI doesn't accept any real relevance to our word today.

PPI on the other hand, which stands for PIXELS PER INCH, is a term that relates to digital images. Pixels, or picture elements, equally we have established, are what digital images are made up of, and are square. The terms DPI and PPI are Non interchangeable, and PPI is the right term to use when talking well-nigh digital images. I'm not going further into the whole DPI / PPI thing here, only there are some good articles going into much detail on this subject here, here and here.

How Pixels and PPI hang together

So before we look at images for the screen, it will be instructive to look quickly at Photoshop'southward Image Size Dialog, to encounter how the resolution (ppi) of an image interacts with the pixel dimensions when printing an image.

Every bit you can meet here in the Photoshop Image Size dialog, Figure 1.1, digital prototype information is presented. The Dimensions section shows the aforementioned pixel dimensions of the image, in this instance 3840 10 5760. This dialog can be used in many ways, only what I want you to take note of is the physical dimensions listed (12.8″ x nineteen.2″). This shows us the physical size of the image if it were to be printed, by taking the number of pixels, and dividing it by the number of pixels per inch. In this example, we have 5760 pixels on the longest length, and if we dissever that by 300 (the PPI) we get an paradigm of 19.2 inches.

What this shows us is that print size is simply a event of how tightly we squash together the pixels we take. If we increase the ppi, say to 400, without resampling the image (adding to or removing from the total number of pixels), the document size goes down to 14.4 inches. If we spread the pixels further and reduce the ppi to say 240, it becomes a 24 inch document. This what I mean when I say pixels have no fixed size.

resizing images for the web

Effigy ane.1 (click for larger view)

Resampling

To consider resampling, let'south use a elementary example. If we wanted to impress an 8″ 10 12″ print from the image this dialog represents, how practise we go about resizing information technology correctly?

Firstly, we have to empathise what resampling is. In a nutshell, resampling is resizing an image by reducing or increasing its number of pixels. And so, if nosotros desire to alter the size of the impress merely keep the resolution at 300 ppi, which is a common standard from a lot of professional photo labs, we simply type the new dimension into the dialog, and Photoshop will throw away or create the needed number of pixels to get the dimensions to work. Now look at Figure 1.2 below. If, for example, we blazon 12 inches into the top field, the resultant dialog would look like this. Note how changing the tiptop to 12 from 19.2 has two effects. One is that the width now becomes 8. This is simply because the aspect ratio of the image (two:iii) is the same aspect ratio equally an 8×12″ print, so irresolute 1 to 12″ means the other one automatically becomes 8″. If the image did not take the same aspect ratio as our desired 8 x 12″, then cropping would be needed instead, merely that'due south some other story for later.

resizing images for the web

Effigy 1.2 (click for larger view)

The 2nd change we can see is that the pixel dimensions have changed. Photoshop has thrown the un-needed pixels abroad (past way of a very complex algorithm no doubtfulness), resulting in an image that is now only 3600 pixels on the longest length. This gives u.s.a. the correct relationship between the document dimensions, the resolution and the number of pixels. 3600 pixels, spread out at 300 pixels per inch gives us 12 inches of image. If nosotros were to change the resolution of the epitome with resample ticked, the certificate size would remain the aforementioned, and again, the pixel dimensions would be altered to accommodate.

A final annotation here is that we can ever change the resolution of an epitome without it affecting the number of pixels in the image. This is important to grasp. The resolution (ppi) is only a press didactics. If nosotros change the resolution without changing the number of pixels in an epitome (by making sure Resample Image is unchecked), we DON'T change the size of the file either. The only two factors controlling file size are number of pixels and prototype format and compression (OK, there's arguably a 3rd factor which is the amount of detail in the photo, which affects compression). When we uncheck the Resample Paradigm checkbox, the pixels are greyed out in the dialog box and the merely affair that can modify when changing the ppi is the document size. And as I've said, this has no consequence on file size. But it is useful and important to exist able ready the desired ppi when printing to different devices, and doing it this mode doesn't bear on the pixels.

The 72 ppi Myth

resizing images for the web

You might have heard the proposition that it's of import to salvage images for web at 72 ppi (or God preclude, dpi). The reasons for this are given as many:

  • Information technology reduces the file size – Absolute Rubbish. PPI doesn't bear on file size at all. Compression does.
  • That's what resolution screens are at – You don't have to friction match the image ppi with the screen ppi. And as well, almost mod monitors are more than 72 ppi anyway.
  • It's the manufacture standard – This is probably the best statement of the lot, equally it is a sort of industry standard. It'southward just that it's an industry standard for no good reason.

In fact, it is not of import at all to set up images to be 72 ppi for the web. It doesn't hurt, but it's not important. The ppi of an image makes no difference to the file size and neither does it make any divergence to the visual appearance of an image on a monitor. It would of course have an result on how big an prototype was printed equally information technology is a printing instruction, but when viewed in a browser, information technology is the monitor itself that determines how much space the pixels have up on the screen. Permit's look at the 3 images below. The get-go has been saved at 72 ppi, the 2nd at 300 ppi and the third at 1000 ppi. Run into any difference? No, of grade y'all don't. They all share the aforementioned physical pixel dimensions (300 x 450 px), and that's the merely matter the browser cares about, and then the logical pedagogy of ppi makes no difference unless we print them. So hopefully, that's all you lot need to put that old chestnut to bed. PPI has no event on file size, and neither does it impact on-screen appearance.

resizing images for the web

Asher @ 72ppi, file size: eighteen.3kb

resizing images for the web

Asher @ 300ppi, file size: 18.3kb

resizing images for the web

Asher @ 1000 ppi, file size: 18.3kb

The Origins of the Myth

Where the 72 ppi myth originally comes from is that screen resolution of the first Macintosh computers back in the mid 80s, used to be 72 ppi (read more here). Simply it's non a stock-still number and nowadays it's a lot more on nigh monitors. Some screens are around 96 ppi, some are up around 120 ppi, while the latest screens on tablets are achieving mind blowing resolutions of over 500 ppi (Retina swallow your heart out). To effigy out exactly what resolution your monitor has, simply mensurate the width of the screen area in inches (not the whole monitor) and then find out what the native resolution is. My monitor'southward native resolution is 1920 x 1080 (total Hard disk drive) and my screen width is 18.622 inches. This gives me a screen resolution of  just over 103 ppi. In other words, 103 pixels in an inch of screen real estate. But to be thorough, I tested this by resizing an paradigm to 1030px and opened it. And yeah, it measured exactly x inches beyond on my screen. This is an surface area of much argue, and it is generally print designers who debate near these numbers. Design is not just screen based, and ppi and dpi have major implications in the print world. But my essential point remains. For spider web based viewing of images, it'southward the screen resolution, in conjunction with the number of pixels, that determines how big the paradigm is displayed on a  monitor, not the inbuilt ppi education in the prototype. Some other very interesting article discussing this topic is The Myth of DPI. It has its own inconsistencies (a pretty large 1 even in the title, as he confuses dpi with ppi from the kickoff) but information technology is essentially a expert read. Fifty-fifty peradventure more than interesting and informative than the article itself though, are the comments. At that place are loads of them, many from quite educated graphic designers with a wealth of knowledge, and the discussion gets quite heated at times. If you have a spare half an hour and the interest, you will learn a lot by reading the various perspectives of spider web and print designers, and those whose workflow does require a bit more than consistency and awareness virtually the ppi of images.

Resizing images for the Web

When you lot empathize that in that location is no real need for setting the ppi in images destined for the spider web, resizing becomes a lot simpler. Basically, you resize the image in pixels at the size y'all want information technology to brandish. Did I say elementary? Well unfortunately, hither we enter a completely different world of pain, that of pixel based web design. Simply at least you don't have to worry about ppi ;). If, for case yous had a WordPress or HTML template that y'all know is 1100 pixels in width and you wanted an image to fill up the content area, and so effectually 1100 pixels in width would be a proficient size. With resizing images for the web, the number of pixels is the only relevant detail. Forget the ppi of the image, and remember it'due south website theme, the resolution of the screen and the number of pixels in the image that volition determine the size of the presented image on screen (disregarding CSS and Retina and some JavaScript at this indicate). You could argue that information technology makes sense to set the ppi to 72 anyway. Fair enough, I suppose. It would requite consistency. I just rail confronting the mistaken belief that information technology is important to do so. If y'all use Save for Spider web in Photoshop, you might detect it doing it for yous anyway. A quirk of the software is that if you save the image with metadata, it won't change the ppi (as that's in the metadata), merely if you strip the metadata out when saving (by choosing None), and then open up the image in Bridge or Photoshop again, y'all volition see that information technology'south now prepare to 72 ppi. I believe this is because the field tin't be empty, and and so Save for Spider web just puts in the default value (which Adobe has set at 72 ppi). I use Photoshop to resize my images, but you can use virtually any decent prototype editor. You lot can even exercise information technology online with services similar http://www.shrinkpictures.com/ and http://www.picresize.com and many others.

Image Resizing and Screen Resolution

Permit's come back to screen resolution, as it majorly affects how big or small nosotros resize our images. One of the biggest difficulties for web designers over the last decade or then was e'er what size images should be. Spider web design is a mixture of rendered, flexible elements similar text and stock-still, pixel based elements like images. Screen resolutions come up in all sorts of sizes, but to design a web site with pixel based elements, you lot have to determine how broad your content expanse is going to exist. There'southward no indicate putting a 2000 px wide image in a webpage if 90% of the population are using screens with a  maximum 1024px resolution. The image is just going to be too big to be seen on the screen. So determining your audience and designing to them was ever a big part of the procedure. It has been changing a lot though in the last decade. You tin define image size with CSS or HTML (i..e upload an image that'south 800px wide and tell the browser to display it at 400px wide), and in that location are likewise java scripts that can automatically resize an image to fit different screen resolutions and new vector based formats like svg are coming through. But designing for the almost common resolution of the day is still a major consideration. The almost mutual resolution today is 1366 x 768 (http://world wide web.w3schools.com/browsers/browsers_display.asp) only with the explosion of unlike grade factors, fifty-fifty that particular resolution has only 34% share. Obviously with responsive templates and the like, a lot of changes are going on in the spider web blueprint space when it comes to images and how to deal with them. Simply the nearly bones part of getting started in this area is understanding that unless y'all have a applied science at play that volition repurpose images on the wing, you are best off resizing your images to fit your template and your audience. If y'all look at the current WordPress templates for case, about have a content container width of effectually 1100 – 12000px. This is to ensure that the content container will never exceed the resolution of the screen. Every bit less than .v% of all desktop users have resolutions less than 1024px, this is a prophylactic bet. In the adjacent year or ii, my judge is we'll see a leap to 1300px or so, as 1024px resolutions now incorporate only two% of users, while Retina style resolutions are increasing quickly. For years I had a photoblog, and I uploaded photos several times a week. It was my do to upload images at 800px width if they were mural oriented, and 650px if they were portrait. At the time, that meant that the images would largely fill the screen of up to 95% of my audience. These days, an 800 px epitome on 27″ iMac looks rather small. But it would notwithstanding look pretty expert on virtually laptops and tablets. Retina displays have made things even more circuitous.

CSS and JavaScript

Another complexity I am going to very speedily impact, is CSS and Javascript. With CSS y'all can tell an image to fit a certain percentage of the container, and with some javascript (Lightbox and the like) has the ability to dynamically increment or decrease the size of the image depending on the resolution of the screen. I don't know a whole lot about this side of things, not being too much of a coder, but I tin can see a time when we but upload a large prototype and the code helps us display it in all all sorts of sizes, We're pretty much at that place already, but not quite. You can also use HTML equally I've said before to display an image at a size other than it's original size. Trouble with this, is yous often become artifacts (jagged lines) and lose quality in the image. You lot are also downloading a bigger file, merely to present information technology at a smaller size. Responsive templates obviously do this sort of thing today, as images get squished downward to fit on a  tablet or  mobile phone. All this sort of dynamic resizing is way beyond the scope of this article, and any knowledge I have, so I invite someone who knows about that side of images for the web to stride up and brainwash us all with a similar commodity.

The 'Consign Every bit' Dialog

Compressing & Resizing images for the web

resizing images for the web

The recently renamed 'Consign As' dialog (previously known every bit Save for Web) in Photoshop is a tool for compressing and resizing images for the web. Information technology outputs to one of 4 file formats, gif, png and jpg, plus, most recently, svg. Let'south first with the most commonly used format, jpg. This is the all-time format for continuous tone images for the web. They can be heavily compressed, while still retaining a lot of their detail. As noted earlier, in that location are two main things that determine file size – the number of pixels in the prototype and the pinch practical when saving as a jpg. 'Export As' is designed to be used on images that are already resized, as it is primarily a compression tool, but even if you load a full size prototype into it, it will load anyway subsequently alert you lot it wasn't designed to do so. Yous can and then resize the image too, merely I prefer to resize the image first using the image size dialog then compress for web using 'Export As'.

The basic compression choice comes in the form a slider that you ready anywhere from 0 to 100. In the example above, it took a 410.7kb prototype and reduced it  to only 74.1kb at 50% quality. How much you compress is up to you, but I detect the all-time rest for size and quality to be around the 50 marker. The compression will also depend on the amount of particular in the epitome (the more detail, the less redundancy is possible). Gif used to be the traditional format for graphics, like logos and such, every bit they support transparency and a smaller color palette, but these days png is the default format for those type of files. Png files support transparency, which is very useful in web design, only pngs are a scrap big, even out of the 'Consign As' dialog. That said, at that place are ways to further reduce the size of pngs, including a great footling online tool https://tinypng.com/ which compresses the png file while retaining transparancy. Equally a bones rule of thumb, use jpgs for photographs on the spider web and png for graphics. For a much more in-depth look at these formats, check out this splendid  article on sixrevisions.com

Color Profiles

This is another huge area, and one that my interests have never taken me to. I'thou very interested in digital asset direction, but color management: yawn…. I'll do my all-time to non make a fool of myself. In fact, to be safe, I will simply say that when saving images for the web, information technology is all-time to ensure they are saved with an sRGB colour contour, every bit this matches virtually closely the gamut of a monitor. Adobe RGB has a larger gamut, merely images in this color profile can look very flat and washed out on the spider web. Most cameras shooting jpgs are set to shoot in sRGB anyway, but if you are shooting RAW, yous have to set the profile yourself when the data becomes an prototype. If you lot use Save for Web, y'all can get it to convert to sRGB when saving, which is probably the easiest way to go about it. It can also embed the color profile as well, for those few browsers that actually check to see if an image has one.

Cropping & Aspect Ratios

This is a topic close to my center. (OK, OK, I'm a nerd. Become over it). Every bit I mentioned before, aspect ratio is inherent in the captured image, as it comes from the capture device. If you lot want a foursquare image, you either accept to shoot it with a 1:1 aspect ratio (Hasselblad anyone?) or you demand to crop, which is totally different from resizing. Cropping is both resizing and irresolute the attribute ratio. Cropping is something to go on in mind when shooting. You might know you want a ane:1 shot, and and then you etch a certain way in photographic camera as if you were shooting with a ane:1 ratio. Or you lot tin creatively crop after you have taken the image, finding new images in the image by selective cropping (as long equally you have plenty of pixels to start with you won't lose too much quality unless you crop abroad most of the image, and particularly not if yous're just going to web). Over the course of centuries, we take become used to certain attribute ratios in our two dimensional visual art. Many take their foundation in mathematics, or in that strange place where aesthetics and mathematics encounter. The Aureate Ratio is a good example of this (this is the "perfect" ratio). The dazzler and simplicity of the square is of class another. Digital SLRs create images in a 3:2 ratio (close to the Aureate Ratio but not exactly). TVs and computer monitors were commonly in the 4:3 ratio, equally are most compact cameras and 16:9 is now a common wide screen ratio. The point of all this is that aspect ratios matter. When you lot crop, stick to an established attribute ratio than to just crop willy nilly. This is where some web designers, particularly WordPress template designers, could do a lot more piece of work. Images in WordPress is another complex topic, as there are so many other things at play when dealing with templates and columns and forced resizing and WordPress epitome resizing etc, just personally I think it's all-time to stick to a bunch of established attribute ratios so that if you have to crop an epitome to re-purpose it, you always do it in a consistent manner.

Conclusion

OK, that'southward information technology. I hope you have learned a few things along the fashion. Thank you for reading. If you dispute annihilation, delight bring it upward in the comments. As long as you are reasonably polite, I will reply, and we might all learn something.