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

The topic of resizing images for the web is a relatively simple, yet ridiculously circuitous one, at the same time. And it'due south also i where at that place is an atrocious lot of misinformation floating around, even from professionals. Only a lot of people have a demand for basic foundational skills when it comes to understanding and resizing digital images for diverse purposes. Hence this mail service…

Huge caveat here: My primary field of cognition is in photography. I have been fiddling with cameras my whole life, and have taught photography and digital imaging at local colleges and independently for the last 10 years (visit iTeachphotographers for more on that), and I experience 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 be know everything about the technical intricacies of spider web design. And I certainly don't profess to knowing everything at that place is to know about pixels either, particularly about pre-press and the printing manufacture. Then if, in spite of my feel and research, I am misinformed or mistaken near some bespeak or other, I welcome any corrections.

Simply Pixels Thing

Pixels

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

A Nikon D800 captures a whopping 7,360 × iv,912pixels (a 36.3MP camera). The top of the line Phase One Digital Camera back, the IQ180, captures a staggering 10328 ten 7760 pixels (over 80 million pixels!). So, pixels are finite and are linked to the capture device. Pixels are our starting bespeak. They are the raw fabric of our images, whether we are are printing or but displaying the prototype on a screen.

The other main role player in the story is resolution. Resolution has many different meanings, and is quite complex when yous wait into it. Broadly speaking though, resolution is basically referring to the particular an image has. The higher the resolution, the more item there is. But in this article, the main type of resolution concept I want to introduce is chosen pixels per inch, otherwise known equally ppi. The all-time way to think about how resolution works together with the number of pixels captured in an image, is that "the number of pixels is determined by the capture device, but pixels have no stock-still size". A pixel is a unit of a digital prototype, but overall resolution depends upon the size of the pixels (and the viewing altitude). The smaller the size of a pixel, the higher the resolution of the image will be and the clearer the image will be.

PPI vs DPI

Earlier we get any further, I retrieve it'south important to analyze the oft misused terms dpi and ppi. DPI is a press term, and it stands for DOTS PER INCH. Printers lay their ink downwardly in dots, and this figure is not the same every bit PPI. Dots accept space in betwixt them, and pixels don't. DPI doesn't accept whatever real relevance to our discussion today.

PPI on the other paw, which stands for PIXELS PER INCH, is a term that relates to digital images. Pixels, or picture elements, as we have established, are what digital images are made upwards of, and are square. The terms DPI and PPI are NOT interchangeable, and PPI is the correct term to utilize when talking about digital images. I'm not going farther into the whole DPI / PPI thing here, but there are some expert articles going into much detail on this field of study hither, here and here.

How Pixels and PPI hang together

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

As you tin can see here in the Photoshop Image Size dialog, Figure 1.1, digital paradigm information is presented. The Dimensions section shows the aforementioned pixel dimensions of the prototype, in this case 3840 x 5760. This dialog can be used in many ways, just what I want yous to take annotation of is the concrete dimensions listed (12.8″ x nineteen.2″). This shows usa the physical size of the image if it were to exist printed, past taking the number of pixels, and dividing it past the number of pixels per inch. In this instance, we have 5760 pixels on the longest length, and if we divide that by 300 (the PPI) nosotros get an paradigm of 19.2 inches.

What this shows u.s.a. is that print size is simply a result of how tightly nosotros squash together the pixels we have. If nosotros increase the ppi, say to 400, without resampling the image (adding to or removing from the full number of pixels), the document size goes downwardly to 14.four inches. If we spread the pixels farther and reduce the ppi to say 240, it becomes a 24 inch certificate. This what I mean when I say pixels have no fixed size.

resizing images for the web

Effigy 1.one (click for larger view)

Resampling

To consider resampling, permit's use a simple example. If we wanted to impress an viii″ ten 12″ print from the paradigm this dialog represents, how do we go virtually resizing it correctly?

Firstly, nosotros have to understand what resampling is. In a nutshell, resampling is resizing an image by reducing or increasing its number of pixels. So, if we desire to change the size of the print but keep the resolution at 300 ppi, which is a common standard from a lot of professional photograph labs, nosotros simply blazon the new dimension into the dialog, and Photoshop will throw away or create the needed number of pixels to go the dimensions to work. Now look at Effigy ane.2 below. If, for example, we type 12 inches into the elevation field, the resultant dialog would await similar this. Note how irresolute the height 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 prototype (2:iii) is the aforementioned attribute ratio every bit an 8×12″ print, so changing one to 12″ means the other one automatically becomes 8″. If the image did not have the aforementioned aspect ratio equally our desired 8 10 12″, then cropping would be needed instead, simply that's another story for afterward.

resizing images for the web

Figure 1.2 (click for larger view)

The 2d change we can encounter is that the pixel dimensions have changed. Photoshop has thrown the united nations-needed pixels abroad (by way of a very complex algorithm no doubt), resulting in an epitome that is now only 3600 pixels on the longest length. This gives us the correct human relationship between the document dimensions, the resolution and the number of pixels. 3600 pixels, spread out at 300 pixels per inch gives the states 12 inches of paradigm. If we were to change the resolution of the image with resample ticked, the document size would remain the aforementioned, and once more, the pixel dimensions would be altered to suit.

A final annotation here is that we tin can e'er modify the resolution of an prototype without it affecting the number of pixels in the paradigm. This is important to grasp. The resolution (ppi) is simply a press instruction. If nosotros change the resolution without changing the number of pixels in an image (by making sure Resample Prototype is unchecked), nosotros DON'T change the size of the file either. The merely two factors controlling file size are number of pixels and epitome format and compression (OK, in that location'southward arguably a tertiary factor which is the amount of detail in the photo, which affects pinch). When we uncheck the Resample Image checkbox, the pixels are greyed out in the dialog box and the only matter that tin can change when changing the ppi is the document size. And as I've said, this has no effect on file size. But information technology is useful and important to exist able fix the desired ppi when printing to dissimilar devices, and doing information technology this manner doesn't bear upon the pixels.

The 72 ppi Myth

resizing images for the web

You might take heard the proposition that information technology's of import to relieve images for web at 72 ppi (or God forbid, dpi). The reasons for this are given every bit many:

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

In fact, it is not important at all to set images to be 72 ppi for the web. Information technology doesn't hurt, only information technology's not important. The ppi of an image makes no difference to the file size and neither does information technology make any difference to the visual appearance of an paradigm on a monitor. It would of form accept an effect on how big an epitome was printed as information technology is a press instruction, merely when viewed in a browser, information technology is the monitor itself that determines how much space the pixels take up on the screen. Permit'southward expect at the three images beneath. The showtime has been saved at 72 ppi, the second at 300 ppi and the third at 1000 ppi. Encounter whatever deviation? No, of course you don't. They all share the aforementioned physical pixel dimensions (300 x 450 px), and that's the only thing the browser cares almost, so the logical instruction of ppi makes no deviation unless we print them. So hopefully, that'south all you need to put that one-time chestnut to bed. PPI has no effect on file size, and neither does information technology bear upon on-screen appearance.

resizing images for the web

Asher @ 72ppi, file size: xviii.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 dorsum in the mid 80s, used to be 72 ppi (read more hither). Only information technology's not a stock-still number and present it'southward a lot more on near monitors. Some screens are around 96 ppi, some are up effectually 120 ppi, while the latest screens on tablets are achieving listen blowing resolutions of over 500 ppi (Retina swallow your heart out). To effigy out exactly what resolution your monitor has, merely measure the width of the screen area in inches (non the whole monitor) and then find out what the native resolution is. My monitor's native resolution is 1920 x 1080 (total HD) 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. Merely to exist thorough, I tested this past resizing an image to 1030px and opened it. And yeah, it measured exactly 10 inches across on my screen. This is an area of much debate, and it is generally print designers who argue about these numbers. Design is non simply screen based, and ppi and dpi accept major implications in the print earth. But my essential signal remains. For web based viewing of images, it'southward the screen resolution, in conjunction with the number of pixels, that determines how big the image is displayed on a  monitor, not the inbuilt ppi instruction in the prototype. Another very interesting article discussing this topic is The Myth of DPI. It has its own inconsistencies (a pretty big 1 even in the championship, as he confuses dpi with ppi from the start) merely it is essentially a good read. Fifty-fifty perhaps more interesting and informative than the commodity itself though, are the comments. There 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 accept a spare half an hour and the interest, you volition learn a lot past reading the various perspectives of web and impress designers, and those whose workflow does crave a bit more consistency and awareness about the ppi of images.

Resizing images for the Web

When you understand that there is no real demand for setting the ppi in images destined for the web, resizing becomes a lot simpler. Basically, you lot resize the image in pixels at the size you want it to display. Did I say unproblematic? Well unfortunately, here we enter a completely different world of pain, that of pixel based web blueprint. But at least yous don't have to worry about ppi ;). If, for instance you had a WordPress or HTML template that you know is 1100 pixels in width and y'all wanted an image to make full the content expanse, then effectually 1100 pixels in width would exist a expert size. With resizing images for the web, the number of pixels is the merely relevant item. Forget the ppi of the image, and call up information technology's website theme, the resolution of the screen and the number of pixels in the epitome that will decide the size of the presented image on screen (disregarding CSS and Retina and some JavaScript at this indicate). You lot could fence that it makes sense to set the ppi to 72 anyway. Off-white enough, I suppose. It would give consistency. I only runway against the mistaken belief that it is important to practise so. If you use Save for Spider web in Photoshop, you might find it doing it for y'all anyway. A quirk of the software is that if you lot salve the prototype with metadata, it won't change the ppi (as that'due south in the metadata), but if yous strip the metadata out when saving (by choosing None), and so open the image in Span or Photoshop again, you will meet that it's now set to 72 ppi. I believe this is considering the field tin't be empty, and and then Save for Web only puts in the default value (which Adobe has set at 72 ppi). I use Photoshop to resize my images, just you can use most whatever decent image editor. You tin even practise information technology online with services similar http://www.shrinkpictures.com/ and http://www.picresize.com and many others.

Image Resizing and Screen Resolution

Permit'due south come up back to screen resolution, as it majorly affects how big or small we resize our images. 1 of the biggest difficulties for web designers over the concluding decade or so was always what size images should be. Web design is a mixture of rendered, flexible elements like text and fixed, pixel based elements like images. Screen resolutions come in all sorts of sizes, but to blueprint a web site with pixel based elements, you accept to determine how wide your content expanse is going to be. In that location'south no indicate putting a 2000 px broad image in a webpage if xc% of the population are using screens with a  maximum 1024px resolution. The prototype is simply going to exist too big to be seen on the screen. So determining your audience and designing to them was e'er a big part of the procedure. Information technology has been irresolute a lot though in the last decade. You can ascertain image size with CSS or HTML (i..e upload an prototype that'south 800px wide and tell the browser to display information technology at 400px broad), and in that location are also 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 twenty-four hour period is nevertheless a major consideration. The most common resolution today is 1366 x 768 (http://www.w3schools.com/browsers/browsers_display.asp) but with the explosion of different form factors, even that item resolution has only 34% share. Apparently with responsive templates and the like, a lot of changes are going on in the web blueprint space when information technology comes to images and how to deal with them. But the well-nigh basic part of getting started in this expanse is understanding that unless you accept a engineering at play that will repurpose images on the fly, you are best off resizing your images to fit your template and your audition. If yous wait at the current WordPress templates for example, near take a content container width of around 1100 – 12000px. This is to ensure that the content container will never exceed the resolution of the screen. As less than .v% of all desktop users take resolutions less than 1024px, this is a safe bet. In the next year or 2, my estimate is we'll see a jump to 1300px or and so, as 1024px resolutions now incorporate only 2% of users, while Retina style resolutions are increasing chop-chop. For years I had a photoblog, and I uploaded photos several times a week. It was my practice to upload images at 800px width if they were landscape 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 audition. These days, an 800 px image on 27″ iMac looks rather small. Merely it would still look pretty skillful on virtually laptops and tablets. Retina displays accept made things fifty-fifty more than complex.

CSS and JavaScript

Some other complexity I am going to very rapidly impact, is CSS and Javascript. With CSS yous can tell an image to fit a certain pct of the container, and with some javascript (Lightbox and the similar) has the ability to dynamically increase or decrease the size of the paradigm depending on the resolution of the screen. I don't know a whole lot about this side of things, non being too much of a coder, but I can see a time when we only upload a big prototype and the code helps united states of america display it in all all sorts of sizes, We're pretty much there already, but not quite. Yous can also utilize HTML as I've said earlier to brandish an epitome at a size other than it's original size. Trouble with this, is y'all often get artifacts (jagged lines) and lose quality in the image. You lot are likewise downloading a bigger file, only to present it at a smaller size. Responsive templates manifestly do this sort of matter today, as images get squished down to fit on a  tablet or  mobile phone. All this sort of dynamic resizing is way beyond the telescopic of this article, and whatsoever knowledge I take, so I invite someone who knows about that side of images for the web to footstep up and brainwash us all with a similar article.

The 'Consign As' Dialog

Compressing & Resizing images for the spider web

resizing images for the web

The recently renamed 'Export Equally' dialog (previously known equally Save for Spider web) in Photoshop is a tool for compressing and resizing images for the web. It outputs to one of four file formats, gif, png and jpg, plus, most recently, svg. Allow's offset with the most ordinarily used format, jpg. This is the best format for continuous tone images for the web. They can be heavily compressed, while even so retaining a lot of their detail. As noted earlier, there are two chief things that determine file size – the number of pixels in the image and the compression practical when saving equally a jpg. 'Export Equally' is designed to exist used on images that are already resized, every bit information technology is primarily a compression tool, but even if you load a full size image into it, it volition load anyway later warning you lot it wasn't designed to do so. Yous can then resize the paradigm equally well, just I prefer to resize the prototype first using the prototype size dialog and and so compress for web using 'Consign As'.

The basic compression choice comes in the grade a slider that you gear up anywhere from 0 to 100. In the case to a higher place, it took a 410.7kb image and reduced information technology  to simply 74.1kb at 50% quality. How much you lot compress is up to you, but I find the best residuum for size and quality to exist around the l marking. The pinch volition also depend on the amount of detail in the paradigm (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 colour 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, but pngs are a bit large, fifty-fifty out of the 'Export As' dialog. That said, there are ways to further reduce the size of pngs, including a keen niggling online tool https://tinypng.com/ which compresses the png file while retaining transparancy. Equally a basic rule of thumb, employ jpgs for photographs on the web and png for graphics. For a much more than in-depth look at these formats, check out this fantabulous  article on sixrevisions.com

Colour Profiles

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

Cropping & Aspect Ratios

This is a topic close to my heart. (OK, OK, I'm a nerd. Go over it). As I mentioned before, attribute ratio is inherent in the captured prototype, as it comes from the capture device. If you want a square epitome, you either have to shoot it with a 1:one aspect ratio (Hasselblad anyone?) or you need to crop, which is totally dissimilar from resizing. Cropping is both resizing and changing the attribute ratio. Cropping is something to keep in listen when shooting. You might know you want a 1:ane shot, and and then you lot compose a certain way in camera as if you were shooting with a 1:1 ratio. Or you can creatively crop afterwards yous have taken the prototype, finding new images in the image by selective cropping (equally long as you have plenty of pixels to start with you lot won't lose also much quality unless you ingather away most of the image, and particularly not if yous're just going to web). Over the course of centuries, nosotros have become used to sure attribute ratios in our two dimensional visual art. Many have their foundation in mathematics, or in that strange place where aesthetics and mathematics encounter. The Golden Ratio is a skillful instance of this (this is the "perfect" ratio). The beauty and simplicity of the square is of course another. Digital SLRs create images in a 3:two ratio (shut to the Golden Ratio just non exactly). TVs and computer monitors were commonly in the iv:3 ratio, every bit are most compact cameras and xvi:9 is at present a common wide screen ratio. The point of all this is that attribute ratios matter. When you crop, stick to an established aspect ratio than to just ingather willy nilly. This is where some web designers, particularly WordPress template designers, could do a lot more work. Images in WordPress is some other complex topic, every bit there are and so many other things at play when dealing with templates and columns and forced resizing and WordPress prototype resizing etc, but personally I think it'southward best to stick to a agglomeration of established attribute ratios so that if yous accept to crop an image to re-purpose information technology, you lot always do it in a consistent mode.

Determination

OK, that's it. I promise you have learned a few things along the way. Thank you for reading. If you dispute anything, please bring information technology up in the comments. As long equally you are reasonably polite, I will respond, and we might all acquire something.