{"id":21597,"date":"2017-09-13T20:21:22","date_gmt":"2017-09-13T20:21:22","guid":{"rendered":"http:\/\/responsive_images_guide_part_3_variable_image_encoding"},"modified":"2024-09-07T16:30:25","modified_gmt":"2024-09-07T23:30:25","slug":"responsive_images_guide_part_3_variable_image_encoding","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding","title":{"rendered":"Responsive Images Guide, Part 3: Variable Image Encoding"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>Welcome to the latest edition of the <a href=\"https:\/\/cloudinary.com\/features\/responsive_images\">Responsive Images<\/a> Guide!<\/p>\n<p>In <a href=\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_1_what_does_it_mean_for_an_image_to_be_responsive#fn-1-mark\">part 1<\/a>, I laid out the big idea: a <em>responsive<\/em> image is a <em>variable<\/em> image \u2013 which adjusts itself to fit variable contexts.<\/p>\n<p>In <a href=\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_2_variable_image_resolution\">part 2<\/a>, we looked at the most common way that an image can do exactly that: scaling itself up and down to fit viewports of different sizes and screens with different densities.<\/p>\n<p>Now, we turn our attention to a different axis of variability: variable image <em>encoding<\/em>.<\/p>\n<p>What do I mean when I say, \u201cvariable encoding\u201d? Two things:<\/p>\n<ol>\n<li>Delivering an image in different <em>formats<\/em> (depending on the end-user\u2019s browser).<\/li>\n<li>Striking different <em>quality\/compression<\/em> tradeoffs (depending on the end user\u2019s screen, connection speed, data plan, and\/or preferences)<\/li>\n<\/ol>\n<p>Let\u2019s tackle both of these, in turn.<\/p>\n<h2>Variable Formats<\/h2>\n<figure>\n<object style=\"max-width: 100%;\" data=\"https:\/\/ericportis.com\/etc\/respimg-guide\/formats_2017-09-13T11:02-07.svg\" type=\"image\/svg+xml\">\nA file whose extension changes between JPG, PNG, GIF, SVG, WEBP, JP2, and JXR\n<\/object>\n<\/figure>\n<p>There are many (<a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_file_formats#Raster_graphics\">many<\/a>) different image formats, and <a href=\"http:\/\/flif.info\">new<\/a> <a href=\"https:\/\/github.com\/google\/pik\">ones<\/a> are being developed all of the time.<\/p>\n<p>This varied, evolving landscape has vexed the <code>&lt;img&gt;<\/code> tag from the very start. To wit\u2014<\/p>\n<blockquote>\n<p>I\u2019d like to propose a new, optional HTML tag:<\/p>\n<p>IMG<\/p>\n<p>Required argument is SRC=\u201curl\u201d.<\/p>\n<p><em>[\u2026]<\/em><\/p>\n<p>Browsers should be afforded flexibility as to which image formats they support. Xbm and Xpm are good ones to support, for example. If a browser cannot interpret a given format, it can do whatever it wants instead (X Mosaic will pop up a default bitmap as a placeholder).<\/p>\n<p><em>[\u2026]<\/em> I know this is hazy wrt image format, but I don\u2019t see an alternative than to just say &#8220;let the browser do what it can\u2019\u2019 and wait for the perfect solution to come along (MIME, someday, maybe).<\/p>\n<p>Let me know what you think\u2026\u2026\u2026<\/p>\n<p>\u2014<a href=\"http:\/\/1997.webhistory.org\/www.lists\/www-talk.1993q1\/0182.html\">Marc Andreessen<\/a> (February 1993)<\/p>\n<\/blockquote>\n<h3>\u201cJust let the browser do what it can\u201d<\/h3>\n<p>Let\u2019s tug on this historical thread a bit and see where it goes, shall we?<\/p>\n<p>Mosaic 0.10, the browser that Marc and his team <a href=\"http:\/\/1997.webhistory.org\/www.lists\/www-talk.1993q1\/0262.html\">released<\/a> just three weeks (!) after proposing <code>IMG<\/code> to the world, supported two formats: <a href=\"https:\/\/en.wikipedia.org\/wiki\/GIF\">Gif<\/a> and <a href=\"https:\/\/en.wikipedia.org\/wiki\/X_BitMap\">XBM<\/a>.<\/p>\n<p>Support for anything else wasn\u2019t suggested until almost a year later.<\/p>\n<blockquote>\n<p>Hello,<\/p>\n<p>Is there a way to include Inlined image not in gif format?<\/p>\n<p>\u2014<a href=\"http:\/\/1997.webhistory.org\/www.lists\/www-talk.1994q1\/0273.html\">Pini Albilia<\/a> (January 1994)<\/p>\n<\/blockquote>\n<p>This innocent, 13-word question ignited a firestorm of responses. Some of them clung tightly to the idea of hyper<em>text<\/em>:<\/p>\n<blockquote>\n<p>The goal of WWW is to build a distributed, global, hypertext system; not to implement every \u201cfeature du jour\u201d that comes along. The correct, and current, solution to this problem is to simply create a hypertext link to the object in question.<\/p>\n<p>\u2014<a href=\"http:\/\/1997.webhistory.org\/www.lists\/www-talk.1994q1\/0306.html\">Tony Sanders<\/a> (January 1994)<\/p>\n<\/blockquote>\n<p>One response proved remarkably prescient:<\/p>\n<blockquote>\n<p>As a (still learng) ) HTML programmer, could I just request one possible extension for a future version of Mosaic, and that\u2019s JPEG handling?<\/p>\n<p>For a specific (but very useful) category of images, they\u2019re very useful, basically because they can be far smaller as long as you don\u2019t mind a few artefacts. [\u2026] Since bandwidth will always lag behind storage, I think this is quite significant for the \u2019Web.<\/p>\n<p>\u2014<a href=\"http:\/\/1997.webhistory.org\/www.lists\/www-talk.1994q1\/0303.html\">Andy Holyer<\/a> (January 1994)<\/p>\n<\/blockquote>\n<p>But the most important reply, for our purposes, came from a programmer working on Mosaic:<\/p>\n<blockquote>\n<p>The advantage to using Gifs, however, is that the document will be viewable in all browsers that support inlined images. If you add a new format, the document will only be viewble by a very limited set of people\u2026\nAt least in terms of Mosaic, we have currently only agreed to support gifs\nand xbms on all three platforms\u2026<\/p>\n<p>\u2014<a href=\"http:\/\/1997.webhistory.org\/www.lists\/www-talk.1994q1\/0279.html\">Jon E. Mittlehauser<\/a><\/p>\n<\/blockquote>\n<p>Sound familiar?<\/p>\n<p>You can\u2019t use\u2014<\/p>\n<ul>\n<li>JPEG<sup id=\"fnref-1\"><a href=\"#fn-1\" class=\"footnote-ref\">1<\/a><\/sup>\n<\/li>\n<li>\n<a href=\"https:\/\/alistapart.com\/article\/pngopacity\">PNG<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/css-tricks.com\/svg-fallbacks\">SVG<\/a>\n<\/li>\n<li>\n<a href=\"http:\/\/caniuse.com\/#feat=jpeg2000\">JPEG2000<\/a>\n<\/li>\n<li>\n<a href=\"http:\/\/caniuse.com\/#feat=apng\">APNG<\/a>\n<\/li>\n<li>\n<a href=\"http:\/\/caniuse.com\/#feat=jpegxr\">JPEG-XR<\/a>\n<\/li>\n<li>\n<a href=\"http:\/\/caniuse.com\/#feat=webp\">WebP<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/blog\/flif_the_new_lossless_image_format_that_outperforms_png_webp_and_bpg\">FLIF<\/a>\n<\/li>\n<\/ul>\n<p>\u2014on the web, because if you do, a majority of your users won\u2019t be able to see anything at all. And browsers have strong incentives to be extremely conservative about rocking this boat of stable, universal support for a small set of formats.<\/p>\n<p>Tale as old as time \u2013\u00a0or at least, <code>&lt;img&gt;<\/code>.<\/p>\n<p>And so, after two decades, there are only four image formats that enjoy usably-universal support: <a href=\"https:\/\/cloudinary.com\/tools\/compress-gif\">GIF<\/a>, JPEG, PNG, and SVG.<\/p>\n<h3>\u201c(MIME, someday, maybe)\u201d<\/h3>\n<p>Must we limit ourselves to serving up these lowest-common-denominators?<\/p>\n<p>No!<\/p>\n<p>In 2017, we can serve different formats to different users, depending on what their browser can handle. We can, for instance, send a <a href=\"https:\/\/cloudinary.com\/tools\/compress-webp\">WebP<\/a> to Chrome, a JPEG-2000 to Safari, and a JPEG-XR to Edge \u2013 and still fall back to a trusty ol\u2019 JPEG in Firefox.<\/p>\n<p>How? In one of two ways.<\/p>\n<h4>On the client, with <code>&lt;picture&gt;<\/code> and <code>&lt;source type&gt;<\/code><\/h4>\n<p>The first (and newest!) way to serve up adaptable-format images is via the <code>&lt;picture&gt;<\/code> and <code>&lt;source&gt;<\/code> elements, using the <code>type<\/code> attribute. <a href=\"https:\/\/cloudfour.com\/thinks\/responsive-images-101-part-7-type\/\">Jason Grigsby has a nice write up of the details<\/a>; in short, we can give the browser a bunch of different URLs and mark them up with those <a href=\"https:\/\/en.wikipedia.org\/wiki\/Media_type#mime.types\">MIME types<\/a> that Mark referenced way back in 1993. The browser loads the first URL whose <code>type<\/code> it supports.<\/p>\n<h4>On the server, with <code>Accept<\/code><\/h4>\n<p>There\u2019s also a much older way to accomplish more or less the same thing, called <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Content_negotiation\">Content negotiation<\/a>.<\/p>\n<p>If you\u2019re writing markup, <code>&lt;picture&gt;<\/code>\/<code>&lt;source type&gt;<\/code> pattern is a lot more work than plain old <code>&lt;img src&gt;<\/code>. You have to generate a bunch of different resources, decide an order of preference, and write out a bunch of extra HTML. Content negotiation says: let\u2019s do all of that work on the server. The client can tell the server which formats it supports up front, via a list of MIME types in the <code>Accept<\/code> HTTP header. Then <em>the server<\/em> can do all of the hard work of generating and managing alternate resources, and deciding which ones to send to which clients.<\/p>\n<p>Unless you\u2019re as handy on the back-end as you are on the front-end, this can be difficult to set up yourself. But if you use an image hosting\/delivery service like Cloudinary, it\u2019s as easy as <a href=\"https:\/\/cloudinary.com\/blog\/adaptive_browser_based_image_format_delivery\">adding a few characters to your URL<\/a>. For instance, this:<\/p>\n<pre><code>&lt;img src=&quot;https:\/\/res.cloudinary.com\/demo\/f_auto\/sample.jpg&quot; alt=&quot;A bee on a flower.&quot; \/&gt;\n<\/code><\/pre>\n<p>Delivers a WebP to Chrome, a JPEG-XR to Edge, and a JPEG to Safari and Firefox \u2013 all from the same <code>src<\/code>.<\/p>\n<p>Whether you use multiple URLs in <code>&lt;picture&gt;<\/code>\/<code>&lt;source type&gt;<\/code> blocks, or a single URL pointing to a smart host, the ability to serve up multiple, alternate formats is not only great for <em>users<\/em> \u2013 it\u2019s also great for the <em>web<\/em>. The ability to fall back safely to older formats gives developers the ability to safely leap forward and use cutting edge formats before they\u2019re supported in every browser. The next twenty years should be a lot more exciting than the last twenty, when it comes to image formats on the web.<\/p>\n<h2>Variable quality\/compression<\/h2>\n<figure>\n<object style=\"max-width: 100%;\" data=\"https:\/\/ericportis.com\/etc\/respimg-guide\/qualities_2017-09-13T11:02-07.svg\" type=\"image\/svg+xml\">\nA file, getting progressively more artifacty\/clear as the quality dials up and down.\n<\/object>\n<\/figure>\n<p>So that\u2019s variable, responsive, image formats, sorted.<\/p>\n<p>What else about the way that images are encoded might we be able to adapt on the fly, in order to give each user the best-possible experience?<\/p>\n<p>Many things! Image compression is <em>complicated<\/em> and encoders provide <a href=\"https:\/\/www.mankier.com\/1\/cjpeg\">a multitude of options, toggles, and switches<\/a> which let you determine the nitty-gritty details of how your image will be compressed. Most encoders also wrap those myriad settings up into one big, friendly, user-facing setting, called \u201cquality.\u201d A high\u2013\u201cquality\u201d file will be nearly indistinguishable from the original, but will also be quite large, file-size-wise. A low-\u201cquality\u201d file may contain distracting artifacts, but it will weigh much less than a high-quality file would. A well-engineered website strikes a judicious balance, serving up images that look fairly good, and load fairly fast.<\/p>\n<p>In the bad old days when I used to \u201cSave for Web\u201d all of my images by hand out of Photoshop, I had a lucky JPEG quality number: 72. At some point, I\u2019d done some quick-and-dirty trial-and-error and determined that, for most images, \u201cunacceptable\u201d compression artifacts started to creep in when Photoshop\u2019s quality was below 60, but \u201cSave for Web\u201d qualities over 80 or so provided diminishing returns. So for years, I exported everything at 72 and never really thought much more about it.<\/p>\n<h3>How low can you go?<\/h3>\n<p>Imagine my surprise when a hot new responsive image technique started making the rounds, advocating for a new go-to quality level: <a href=\"https:\/\/www.filamentgroup.com\/lab\/compressive-images.html\">zero<\/a>.<\/p>\n<p>Turns out, JPEG\u2019s compression artifacts aren\u2019t as noticeable when they\u2019re rendered at Hi-DPI, and when browsers scale 2x, highly-compressed images down to fit 1x screens, most of the artifacts get scaled\/blurred away, too.<\/p>\n<p>Before we had <a href=\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_2_variable_image_resolution\">good, standard, ways to serve up images in multiple, alternate resolutions<\/a>, compressive images provided a promising path forward. Unfortunately, even though they saved bytes over the wire, compressive images did nothing to save browsers from all of the work that they have to do <em>after<\/em> they\u2019ve downloaded an over-sized image, namely: decoding, storing, and resizing it. <em>Double turns out,<\/em> sending high-resolution images to everyone, even if they\u2019re <em>highly-compressed<\/em> and <em>reasonably light<\/em>, <a href=\"https:\/\/timkadlec.com\/2013\/11\/why-we-need-responsive-images-part-deux\/\">can lead to<\/a> slow paint times, janky scrolls, thrashed memory and trashed battery-life on low-powered devices.<\/p>\n<p>So, compressive images were not the one true responsive images solution. But they did teach us something: <a href=\"https:\/\/github.com\/ResponsiveImagesCG\/picture-element\/issues\/273\">we can and should<\/a> send lower-quality\/higher-compression images to hi-DPI screens, where compression artifacts are less visible. \u201cCompressive images\u201d provided the first, concrete use case for variable-compression images, and it wasn\u2019t long until lights started going off in people\u2019s heads about a much, much bigger one.<\/p>\n<h3>Your next billion users<\/h3>\n<p>Ilya Grigorick summarizes it nicely in <a href=\"https:\/\/developers.google.com\/web\/updates\/2016\/02\/save-data\">this article about the <code>Save-Data<\/code> Client Hint<\/a>.<\/p>\n<p>In short, billions (billions!) of internet-connected people pay dearly \u2013 with their time and money \u2013 for what we in the <a href=\"https:\/\/www.smashingmagazine.com\/2017\/03\/world-wide-web-not-wealthy-western-web-part-1\/\">wealthy west<\/a> consider small amounts of data. <a href=\"https:\/\/www.gsma.com\/mobileeconomy\/\">Most of the world still connects to the internet via 2G<\/a>, and the income-adjusted cost of loading a few hundred kilobytes to a user in, say, Afghanistan is staggering. Thus, almost <a href=\"http:\/\/gs.statcounter.com\/browser-market-share#monthly-201706-201706-bar\">9% of all page loads<\/a> and <a href=\"http:\/\/gs.statcounter.com\/browser-market-share\/all\/india#monthly-201706-201706-bar\">41% of those from India<\/a> come from a browser that most westerners have never heard of: <a href=\"https:\/\/en.wikipedia.org\/wiki\/UC_Browser\">UC Browser<\/a>, which re-compresses and optimizes sites on proxy servers, before sending them to users. And the vast majority of gains that UC Browser and other <a href=\"http:\/\/www.opera.com\/turbo\">proxy<\/a> <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.yandex.browser\">browsers<\/a> like it provide come from \u2013 you guessed it \u2013 re-compressing images.<\/p>\n<p>So: why not cut out the middleman? Why not do that extra compression for users with constrained connections <em>ourselves<\/em>, on our own servers? What if we could dynamically dial our image quality\/compression up and down, per-user, in response to connection speed and user preferences?<\/p>\n<p>This is the promise of the <a href=\"https:\/\/developers.google.com\/web\/updates\/2016\/02\/save-data\"><code>Save-Data<\/code> Client Hint<\/a>. The hint is currently only emitted by <a href=\"https:\/\/www.chromium.org\/blink\">Blink-based browsers<\/a>, but that shouldn\u2019t stop you from using it to implement responsively-compressed images today. If you don\u2019t have the ability to implement support for it on the back end, you can craft your own proxy-of-a-sort on the front-end using Service Workers \u2013 or just point to an image hosting\/delivery service <a href=\"https:\/\/cloudinary.com\/blog\/the_holy_grail_of_image_optimization_or_balancing_visual_quality_and_file_size\">like Cloudinary<\/a>, which will smartly handle variable compression for you, automatically.<\/p>\n<h2>Variable encodings for variable contexts<\/h2>\n<p>So, to review:<\/p>\n<ul>\n<li>\n<a href=\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_1_what_does_it_mean_for_an_image_to_be_responsive#fn-1-mark\">A responsive image is a variable image that adapts to meet variable contexts.<\/a>\n<\/li>\n<li>The most important axis of variability, when it comes to responsive images, is <a href=\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_2_variable_image_resolution\">resolution<\/a>.<\/li>\n<li>In this article, we looked at another: variable image <em>encoding<\/em>. Which is really an umbrella term for two (related) things: format-switching, based on which formats a given browser supports, and quality\/compression-switching, based on a user\u2019s screen resolution, connection, and\/or preferences.<\/li>\n<\/ul>\n<p>So, so far, we\u2019ve looked at dynamically adapting images\u2019 height, width, format, and quality. What else might we want to change about our images in order to respond to users\u2019 particular contexts? Join us next time, when we\u2019ll reach the final frontier of responsive image variability: variable image <em>content<\/em>.<\/p>\n<hr \/>\n<ol>\n<li id=\"fn-1\">Allow me to close the loop on our JPEG support story. Marc left the Mosaic project in \u201993 and founded Netscape in April of \u201994. When Netscape Navigator was announced to the public in the fall of \u201994, <a href=\"http:\/\/home.mcom.com\/info\/newsrelease.html\">JPEG support was one of its three big headline features<\/a>. Mosaic quickly followed suit, <a href=\"http:\/\/1997.webhistory.org\/www.lists\/www-talk.1995q2\/0049.html\">shipping JPEG support six months later<\/a>. So when Microsoft licensed Mosaic\u2019s code and used it as the foundation of Internet Explorer 1.0, released in August of 1995, it supported JPEGs, too. Thus, supported by both major browsers, JPEG became the standard format for photographic images on the web. Twenty-two years later, it still is. <a href=\"#fnref-1\" class=\"footnote-backref\">&#8617;<\/a><\/li>\n<\/ol>\n<h2>Further Reading on Responsive Images<\/h2>\n<ul>\n<li>\n<a href=\"https:\/\/cloudinary.com\/blog\/make_all_images_on_your_website_responsive_in_3_easy_steps\">Responsive images with Cloudinary<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/blog\/introducing_smart_cropping_intelligent_quality_selection_and_automated_responsive_images\">Auto-Crop Images for Responsive Designs and Improved Image Quality<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/blog\/responsive_images_with_srcset_sizes_and_cloudinary\">Responsive Images: The srcset and sizes HTML Image Attributes<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/blog\/make_all_images_on_your_website_responsive_in_3_easy_steps\">Make All Images on Your Website Responsive in 3 Easy Steps<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/blog\/best_practices_for_responsive_web_design\">Best Practices for Responsive Web Design<\/a>\n<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":22684,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[157,249,251],"class_list":["post-21597","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-image-formats","tag-responsive","tag-responsive-images"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Responsive Images Guide Part 3: Variable Image Encoding<\/title>\n<meta name=\"description\" content=\"Use cases and methods for dynamically switching between different image formats and compression\/quality levels to deliver responsively-encoded images.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Responsive Images Guide, Part 3: Variable Image Encoding\" \/>\n<meta property=\"og:description\" content=\"Use cases and methods for dynamically switching between different image formats and compression\/quality levels to deliver responsively-encoded images.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-13T20:21:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-07T23:30:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1645575333\/website-2021\/blog\/dials\/dials-png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"583\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Responsive Images Guide, Part 3: Variable Image Encoding\",\"datePublished\":\"2017-09-13T20:21:22+00:00\",\"dateModified\":\"2024-09-07T23:30:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding\"},\"wordCount\":7,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA\",\"keywords\":[\"Image Formats\",\"Responsive\",\"Responsive Images\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2017\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding\",\"url\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding\",\"name\":\"Responsive Images Guide Part 3: Variable Image Encoding\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA\",\"datePublished\":\"2017-09-13T20:21:22+00:00\",\"dateModified\":\"2024-09-07T23:30:25+00:00\",\"description\":\"Use cases and methods for dynamically switching between different image formats and compression\/quality levels to deliver responsively-encoded images.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA\",\"width\":1200,\"height\":583},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Responsive Images Guide, Part 3: Variable Image Encoding\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Responsive Images Guide Part 3: Variable Image Encoding","description":"Use cases and methods for dynamically switching between different image formats and compression\/quality levels to deliver responsively-encoded images.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding","og_locale":"en_US","og_type":"article","og_title":"Responsive Images Guide, Part 3: Variable Image Encoding","og_description":"Use cases and methods for dynamically switching between different image formats and compression\/quality levels to deliver responsively-encoded images.","og_url":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding","og_site_name":"Cloudinary Blog","article_published_time":"2017-09-13T20:21:22+00:00","article_modified_time":"2024-09-07T23:30:25+00:00","og_image":[{"width":1200,"height":583,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1645575333\/website-2021\/blog\/dials\/dials-png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding"},"author":{"name":"","@id":""},"headline":"Responsive Images Guide, Part 3: Variable Image Encoding","datePublished":"2017-09-13T20:21:22+00:00","dateModified":"2024-09-07T23:30:25+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding"},"wordCount":7,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA","keywords":["Image Formats","Responsive","Responsive Images"],"inLanguage":"en-US","copyrightYear":"2017","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding","url":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding","name":"Responsive Images Guide Part 3: Variable Image Encoding","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA","datePublished":"2017-09-13T20:21:22+00:00","dateModified":"2024-09-07T23:30:25+00:00","description":"Use cases and methods for dynamically switching between different image formats and compression\/quality levels to deliver responsively-encoded images.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA","width":1200,"height":583},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/responsive_images_guide_part_3_variable_image_encoding#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Responsive Images Guide, Part 3: Variable Image Encoding"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1645575333\/website-2021\/blog\/dials\/dials.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=21597"}],"version-history":[{"count":8,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21597\/revisions"}],"predecessor-version":[{"id":35607,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21597\/revisions\/35607"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/22684"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=21597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=21597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=21597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}