Best image format for web site
The more distinct colors in an image, the larger a JPEG’s file size will be, as it is harder for the JPEG’s algorithm to find easy areas in which to compress and blend colors. Save for Web will help you find a balance between aesthetics and file size for your images. Unlike Save As, Save for Web will provide additional optimizations for generated image files, and will also allow you to tweak the quality of the image and preview the result before saving. In Photoshop, you have two main ways to generate an image: the Save for Web tool, and Save As. In this comparison of Photoshop’s Save for web export quality, the lower-quality JPEG images have more artifacting around edges of high contrast, such as the green background surrounding the top white leaves. As you compare the images exported at quality 25, 50, 75, and 100, notice that the lower qualities have more artifacting around the edges of high contrast.įigure 3-2. In Figure 3-2, we can see a zoomed-in portion of a photograph that has been exported at various qualities using Photoshop’s Save for Web tool. Look for artifacts, messy contrast between elements, and blurry details and text. It’s important to play with the file size and see what level of compression is noticeable. You’re aiming for a happy medium of acceptable quality and small file size. With any image file you generate, test out a few different qualities and file types in the Save for Web workflow within Photoshop.
The smart compression in JPEGs will generally result in a smaller file size for complex images, which is one of our goals as we work to improve how long it takes to load a web page. But because JPEGs are excellent at creating relatively smaller files with a lot of information in them, it’s no surprise that the majority of the images on the Web are JPEGs. Images with sharp contrasts between adjacent pixels are usually better suited for a different file format (such as PNG), since in a JPEG format you will likely see artifacting. JPEGs are very smart at discarding information over smooth gradients and areas of low contrast. Artifacting may cause an image to look fuzzy, pixelated, or blurry. What Is “Artifacting”?Īn artifact is a loss of clarity within an area of an image. Lossy file types discard pieces of information as they are saved JPEGs choose which pieces of information to discard by using an algorithm based loosely on how humans see and perceive information. At low quality, we’ll notice artifacting, banding, and graininess in JPEG images, as JPEG is a lossy file format. JPEGs are designed to compress files in ways that our eyes won’t notice at a high enough quality. JPEGs are the ideal file format for photographs or other images with a large spectrum of colors.
BEST IMAGE FORMAT FOR WEB SITE HOW TO
Let’s walk through the pros and cons of each of these file formats as well as how to export and optimize each kind of image. Image format overview Formatĭecrease quality, export as progressive, reduce noiseĭecrease dithering, decrease number of colors, increase horizontal patterns, reduce vertical noiseĭecrease dithering, decrease number of colors, increase horizontal and vertical patterns Table 3-1 outlines each popular image file format, how it’s best used, and some optimization tips for it. The most common image file formats on the Web are JPEG, GIF, and PNG. How will this image be repurposed across the site?.At what maximum height and width will this image be displayed?.How compressed can this image be without a noticeable quality reduction?.You have a range of file types to choose from when creating images for your site. Let’s start by looking at the various image file types available, and then we’ll examine the options you have for optimizing your site’s images for page speed. Optimizing your site’s image creation workflows for performance improvements.Looking for ways to reduce the total number of image requests on your site.Finding the right balance of file size and quality for each image.You can make substantial improvements to both your main content images as well as the images that make up your site design by: The survey of page weight shows that images make up the majority of most sites’ total page weight. Thanks to their relatively large file size and the number of images included on the average site (see Figure 3-1), optimizing images is arguably the easiest big win when it comes to improving your site’s page load time. The number of image bytes has grown by more than 30% on the average web page in the last year, with very little growth in requests. Images make up the majority of most sites’ total page weight. Optimizing Images | Designing for Performanceĭesigning for Performance Optimizing Images