{"id":1079,"date":"2022-07-06T04:46:45","date_gmt":"2022-07-06T04:46:45","guid":{"rendered":"https:\/\/lucyestela.com\/dev\/?p=1079"},"modified":"2022-07-06T04:46:45","modified_gmt":"2022-07-06T04:46:45","slug":"website-optimisation-tip-converting-pngs-to-webp","status":"publish","type":"post","link":"https:\/\/lucyestela.com\/dev\/html\/website-optimisation-tip-converting-pngs-to-webp\/","title":{"rendered":"Website Optimisation Tip: Converting .pngs to .webp"},"content":{"rendered":"<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<p class=\"\"><span>Convert your images to .webp for better load times.<\/span><\/p>\n<p>Using Command Prompt navigate to the folder with your image.<\/p>\n<p class=\"\">If you have just one image you can use this line : the 70 is the quality of the output. 0 is lowest 100 is highest<\/p>\n<p class=\"\"><span>cwebp -q 7<\/span><span class=\"token number\">0 <\/span><span>yourImageName.jpg -o yourImageName.webp<\/span><\/p>\n<p>If you have a whole folder of images, you can use the following to make it quicker.<\/p>\n<p class=\"\"><span class=\"token variable\">`<\/span><span class=\"token keyword\">for<\/span><span> <\/span><span class=\"token for-or-select variable\">file<\/span><span> <\/span><span class=\"token keyword\">in<\/span><span> images\/*<\/span><span class=\"token punctuation\">;<\/span><span> <\/span><span class=\"token keyword\">do<\/span><span> cwebp -q 7<\/span><span class=\"token number\">0<\/span><span> <\/span><span class=\"token string\">&#8220;<span class=\"token variable\">$file<\/span>&#8220;<\/span><span> -o <\/span><span class=\"token string\">&#8220;<span class=\"token variable\">${file<span class=\"token operator\">%<\/span>.*}<\/span>.webp&#8221;<\/span><span class=\"token punctuation\">;<\/span><span> <\/span><span class=\"token keyword\">done<\/span><span class=\"token variable\">`<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Convert your images to .webp for better load times. Using Command Prompt navigate to the folder with your image. If you have just one image you can use this line : the 70 is the quality of the output. 0 is lowest 100 is highest cwebp -q 70 yourImageName.jpg -o yourImageName.webp If you have a &#8230; <a title=\"Website Optimisation Tip: Converting .pngs to .webp\" class=\"read-more\" href=\"https:\/\/lucyestela.com\/dev\/html\/website-optimisation-tip-converting-pngs-to-webp\/\" aria-label=\"More on Website Optimisation Tip: Converting .pngs to .webp\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[67,127],"tags":[],"class_list":["post-1079","post","type-post","status-publish","format-standard","hentry","category-html","category-web"],"_links":{"self":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/comments?post=1079"}],"version-history":[{"count":1,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1079\/revisions"}],"predecessor-version":[{"id":1080,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1079\/revisions\/1080"}],"wp:attachment":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/media?parent=1079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/categories?post=1079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/tags?post=1079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}