{"id":150516,"date":"2021-12-08T17:42:54","date_gmt":"2021-12-08T17:42:54","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/squidge\/"},"modified":"2021-12-21T13:27:20","modified_gmt":"2021-12-21T13:27:20","slug":"squidge","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/squidge\/","author":16620385,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.4","stable_tag":"trunk","tested":"5.8.13","requires":"5.5","requires_php":"5.6","requires_plugins":"","header_name":"Squidge","header_author":"Ainsley Clark","header_description":"A WordPress Plugin to compress and convert images using cwebp, jpegoptim and optipng.","assets_banners_color":"","last_updated":"2021-12-21 13:27:20","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/donate?hosted_button_id=PQG5A34KWUXRJ","header_plugin_uri":"https:\/\/github.com\/ainsleyclark\/squidge","header_author_uri":"https:\/\/github.com\/ainsleyclark","rating":3.7,"author_block_rating":0,"active_installs":40,"downloads":2457,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["installation","faq","changelog","description"],"tags":{"0.1.2":{"tag":"0.1.2","author":"ainsleyclark","date":"2021-12-21 13:27:20"},"0.1.3":{"tag":"0.1.3","author":"ainsleyclark","date":"2021-12-21 13:27:20"}},"upgrade_notice":[],"ratings":{"1":1,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":2641409,"resolution":false,"location":"assets","locale":false}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.2","0.1.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2641409,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2641409,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Plugin settings page","2":"Example compression tab"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[17209,133,29152,4884,15376],"plugin_category":[50],"plugin_contributors":[205762],"plugin_business_model":[],"class_list":["post-150516","plugin","type-plugin","status-publish","hentry","plugin_tags-compression","plugin_tags-image","plugin_tags-image-compression","plugin_tags-lazy-load","plugin_tags-webp","plugin_category-media","plugin_contributors-ainsleyclark","plugin_committers-ainsleyclark"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/squidge\/assets\/icon.svg?rev=2641409","icon":"https:\/\/ps.w.org\/squidge\/assets\/icon.svg?rev=2641409","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/squidge\/assets\/screenshot-1.png?rev=2641409","caption":"Plugin settings page"},{"src":"https:\/\/ps.w.org\/squidge\/assets\/screenshot-2.png?rev=2641409","caption":"Example compression tab"}],"raw_content":"<!--section=installation-->\n<ol>\n<li>Go to the <a href=\"https:\/\/github.com\/ainsleyclark\/squidge\/releases\">releases<\/a> section and download the plugin.<\/li>\n<li>Upload the <code>squidge<\/code> plugin to your <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the \"Plugins\" menu in WordPress.<\/li>\n<li>Check the Settings tab under <code>Settings | Squidge Options<\/code> to ensure the libraries are installed, if they aren't,\nrun the commands listed dependent on your operating system.<\/li>\n<li>Check the individual optimisation tabs and adjust settings accordingly.<\/li>\n<li>Done!<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20the%20plugin%20replace%20existing%20images%3F'><h3>Does the plugin replace existing images?<\/h3><\/dt>\n<dd><p>Yes<\/p><\/dd>\n<dt id='what%20are%20the%20supported%20operating%20systems%3F'><h3>What are the supported operating systems?<\/h3><\/dt>\n<dd><p>Windows, Linux, &amp; Mac OSX.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial Release<\/li>\n<\/ul>\n\n<!--section=description-->\n<p>Squidge is a FREE WordpPress Plugin built for developers in mind compressing and convert images using jpegoptim,\noptipng, cwebp, and libavif. It's extremley simple to use and is designed to increase PSI and boost rankings.<\/p>\n\n<h3>Why?<\/h3>\n\n<p>Image compression in WordPress can be costly, confusing and sometimes just simply don't work. We have aimed to simplify\nthe process by requiring the developer to install the required package on the operating system and Squidge does the\nhard work for you.<\/p>\n\n<ul>\n<li><strong>IT'S FREE<\/strong><\/li>\n<li>Unlimited file size, no limits.<\/li>\n<li>Optimised for your site to rank.<\/li>\n<li>CLI to regenerate all of your media files.<\/li>\n<li>Helper functions to output images in templates.<\/li>\n<li>Uses the native <code>cwebp<\/code> and <code>libavif<\/code> libraries.<\/li>\n<\/ul>\n\n<h3>What does Squidge do?<\/h3>\n\n<p>Squidge compresses and converts image files when the user has uploaded a file to WordPress.<\/p>\n\n<ul>\n<li>Compresses JPG images using <code>jpegoptim<\/code>.<\/li>\n<li>Compresses PNG images using <code>optipng<\/code>.<\/li>\n<li>Converts JPG and PNG images to <code>.webp<\/code> files using <code>cwebp<\/code> with the appended extension  e.g. <code>image.jpg.webp<\/code>.<\/li>\n<li>Converts JPG and PNG images to <code>.avif<\/code> files using <code>libavif<\/code> with the appended extension  e.g. <code>image.jpg.avif<\/code>.<\/li>\n<\/ul>\n\n<h3>Render Images<\/h3>\n\n<p>To render images in templates, you can either set up nginx or apache rules to serve images dynamically or used the\n    squidge_image helper function. This dynamically checks if an <code>.avif<\/code> or <code>.webp<\/code> file is available on the file system\nand returns the output.<\/p>\n\n<h3>Function<\/h3>\n\n<pre><code>\/**\n * Returns a &lt;picture&gt; element with source media for the standard file passed\n * (such as a JPG), the .avif file, the .webp file (if to exist on the file system).\n *\n * Appropriate &lt;source&gt; elements for image sizes with max widths.\n * Finally, the main be outputted with alt and title text.\n *\n * - If lazy is true, the data-src or data-srcset will be appended.\n * - If a class is set, the class will be outputted on the &lt;picture&gt; element.\n *\n * @param $image_id\n * @param string $class\n * @param false $lazy\n * @return string\n *\/\nfunction squidge_image($image_id, $class = '', $lazy = false)\n<\/code><\/pre>\n\n<h3>Output<\/h3>\n\n<pre><code>&lt;picture class=\"picture\"&gt;\n    &lt;!-- Loads if AVIF is supported and the window is smaller than 400px wide --&gt;\n    &lt;source media=\"(max-width: 400px)\" srcset=\"\/sample-image.jpg.avif\" type=\"image\/avif\"&gt;\n    &lt;source media=\"(max-width: 400px)\" srcset=\"\/sample-image.jpg.webp\" type=\"image\/webp\"&gt;\n    &lt;source media=\"(max-width: 400px)\" srcset=\"\/sample-image.jpg\"&gt;\n    &lt;!-- AVIF &amp; Wep Initial Sizes --&gt;\n    &lt;source srcset=\"\/sample-image.jpg.avif\" type=\"image\/avif\"&gt;\n    &lt;source srcset=\"\/sample-image.jpg.webp\" type=\"image\/webp\"&gt;\n    &lt;!-- Default --&gt;\n    &lt;img src=\"\/sample-image.jpg\" alt=\"Alt text\" title=\"Sample JPG\"&gt;\n&lt;\/picture&gt;\n<\/code><\/pre>\n\n<h3>Credits<\/h3>\n\n<p>Written by <a href=\"https:\/\/github.com\/ainsleyclark\">Ainsley Clark<\/a><\/p>","raw_excerpt":"Squidge is a FREE WordpPress Plugin built for developers in mind compressing and convert images using jpegoptim, optipng, cwebp, and libavif.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/150516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=150516"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ainsleyclark"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=150516"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=150516"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=150516"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=150516"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=150516"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=150516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}