--- url: "https://web.dev/articles/image-policies" titulek: "Image policies for fast load times and more | Articles | web.dev" h1: "Image policies for fast load times and more Stay organized with collections Save and categorize content based on your preferences." popis: "Images take up a significant amount of visual space and make up the majority of the downloaded bytes on a website. Use the new feature policies to identify oversized images." jazyk: "en" kanonicka: "https://web.dev/articles/image-policies" drobecky: ["Articles", "Image policies for fast load times and more"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 00:05:11" znaku: 10221 slov: 1561 kodovani: "iso-8859-2" sha256: "a51f2ab58adf600ebefbb3dc5627c14bc2169606e8bc383b01e96a5feff41324" --- Image policies for fast load times and more Stay organized with collections Save and categorize content based on your preferences. Use optimized image policies to ensure your site is using the best performing images. Luna Lu Images often take up a significant amount of visual space and make up the majority of the downloaded bytes on a website. Optimizing images can improve loading performance and reduce network traffic. Surprisingly, more than half of the sites on the web are serving poorly compressed or unnecessarily large images. This leaves a lot of room for performance improvements simply by optimizing the images. You may ask, how do I know if my images are optimized and how should I optimize them? We are experimenting with a new set of feature policies for image optimization: `oversized-images`, `unoptimized-lossy-images`, `unoptimized-lossless-images`, and`unoptimized-lossless-images-strict`. All are now available for [origin trials](https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/developer-guide.md). Optimized image policies Permissions policy is introducing a new set restrictions on images that can be applied with development-time enforcement. Images violating any of the restrictions will be rendered as placeholder images, which are easy to identify and fix. These policies can be specified in report-only mode where images will render normally without enforcement while violations are being observed via reports. (See Report-only mode in the wild, below for details.) oversized-images The `oversized-images` permissions policy restricts the intrinsic dimensions of an image in relation to its container size. When a document uses the `oversized-images` policy, any `` element whose intrinsic resolution is more than X times larger than the container size in either dimension will be replaced with a placeholder image. Why? Serving images larger than what the viewing device can render—for example, serving desktop images to mobile contexts, or serving high-pixel-density images to a low-pixel-density device—is wasting network traffic and device memory. Read [Serve images with correct dimensions](/articles/serve-images-with-correct-dimensions) and [Serve responsive images](/articles/serve-responsive-images) for information on optimizing your images. Examples A few examples illustrate this. The following shows the default behavior when cutting an image's display size in half. The default resizing behavior. If I apply the following permissions policy, I get a placeholder image instead. `Permissions-Policy: oversized-images *(2);` When the image is too large for the container. I get similar results if I lower only the width or the height. Resize width and height. How to use To summarize, `oversized-images` policy can be specified through either: `Permissions-Policy` HTTP header `