{"id":807,"date":"2022-10-22T19:24:03","date_gmt":"2022-10-22T19:24:03","guid":{"rendered":"https:\/\/precisefuture.com\/?p=807"},"modified":"2023-02-08T08:59:27","modified_gmt":"2023-02-08T08:59:27","slug":"rewrite-rules-for-ewww-image-optimizer","status":"publish","type":"post","link":"https:\/\/precisefuture.com\/en\/general-information\/rewrite-rules-for-ewww-image-optimizer\/","title":{"rendered":"Rewrite rules for EWWW Image Optimizer"},"content":{"rendered":"<p><a href=\"https:\/\/ewww.io\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">EWWW Image <\/a><a href=\"https:\/\/ewww.io\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">optimizer<\/a> It is one of the plugins we have worked with that is the most suitable for our hosting stack, cloud and plugins used in the sites we work with.<\/p>\n\n\n\n<p>However, we can&#039;t get the rewrite rules to get pushed properly into our stack and once you try to push them from the plugin settings it&#039;s not easy to find again. That&#039;s why we leave them here<\/p>\n\n\n\n<pre id=\"ewww-image-optimizaer-rewrite-rules\" class=\"wp-block-code\"><code>RewriteEngine On RewriteCond %{HTTP_ACCEPT} image\/webp RewriteCond %{REQUEST_FILENAME} (.*)\\.(jpe?g|png|gif)$ RewriteCond %{REQUEST_FILENAME}\\.webp -f RewriteCond %{QUERY_STRING } !type=original RewriteRule (.+)\\.(jpe?g|png|gif)$ %{REQUEST_URI}.webp [T=image\/webp,L] Header append Vary Accept AddType image\/webp .webp<\/code><\/pre>\n\n\n\n<p>In our case it is not a problem since even in the free version of the plugin if you deliver your content through a CDN (in our case AWS CloudFront), it allows rewriting using javascript. <\/p>","protected":false},"excerpt":{"rendered":"<p>EWWW Image Optimizer is one of the plugins with which we have worked, the most suitable for our hosting stack, cloud and plugins used in the sites we work with. However, the rewrite rules cannot be pushed properly into our stack and once you try to push them from the [\u2026]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"cliente":[],"herramienta":[],"class_list":["post-807","post","type-post","status-publish","format-standard","hentry","category-informacion-general"],"acf":[],"_links":{"self":[{"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/posts\/807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/comments?post=807"}],"version-history":[{"count":1,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/posts\/807\/revisions"}],"predecessor-version":[{"id":1841,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/posts\/807\/revisions\/1841"}],"wp:attachment":[{"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/media?parent=807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/categories?post=807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/tags?post=807"},{"taxonomy":"cliente","embeddable":true,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/cliente?post=807"},{"taxonomy":"herramienta","embeddable":true,"href":"https:\/\/precisefuture.com\/en\/wp-json\/wp\/v2\/herramienta?post=807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}