Squidge is a FREE WordpPress Plugin built for developers in mind compressing and convert images using jpegoptim,
optipng, cwebp, and libavif. It’s extremley simple to use and is designed to increase PSI and boost rankings.
Image compression in WordPress can be costly, confusing and sometimes just simply don’t work. We have aimed to simplify
the process by requiring the developer to install the required package on the operating system and Squidge does the
hard work for you.
Squidge compresses and converts image files when the user has uploaded a file to WordPress.
To render images in templates, you can either set up nginx or apache rules to serve images dynamically or used the
squidge_image helper function. This dynamically checks if an .avif or .webp file is available on the file system
and returns the output.
/** * Returns a <picture> element with source media for the standard file passed * (such as a JPG), the .avif file, the .webp file (if to exist on the file system). * * Appropriate <source> elements for image sizes with max widths. * Finally, the main be outputted with alt and title text. * * - If lazy is true, the data-src or data-srcset will be appended. * - If a class is set, the class will be outputted on the <picture> element. * * @param $image_id * @param string $class * @param false $lazy * @return string */ function squidge_image($image_id, $class = '', $lazy = false)
<picture class="picture"> <!-- Loads if AVIF is supported and the window is smaller than 400px wide --> <source media="(max-width: 400px)" srcset="/sample-image.jpg.avif" type="image/avif"> <source media="(max-width: 400px)" srcset="/sample-image.jpg.webp" type="image/webp"> <source media="(max-width: 400px)" srcset="/sample-image.jpg"> <!-- AVIF & Wep Initial Sizes --> <source srcset="/sample-image.jpg.avif" type="image/avif"> <source srcset="/sample-image.jpg.webp" type="image/webp"> <!-- Default --> <img src="/sample-image.jpg" alt="Alt text" title="Sample JPG"> </picture>
Written by Ainsley Clark
Starting from $0 per month.
Rating
Reviewers
3 reviews
Tags
Developed By
Ainsley Clark
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Add announcements to your site to share important updates, keep visitors informed, and guide them toward actions that support engagement and conversions.
Display clean code snippets with syntax highlighting to improve technical content and help developers scan examples quickly.
Show key stats with an animated number counter that draws attention, adds social proof, and helps increase trust and conversions.
Add a unified chat tool to your site that connects users via WhatsApp, Messenger, Telegram, or email for seamless support.
Use product blobs to highlight key items, draw attention to featured products, and guide visitors toward faster and more confident purchase decisions.
Add a testimonials slider to your site to showcase real customer feedback, build credibility, and increase trust that leads to higher conversions.
Create a TDEE Calculator that helps visitors estimate daily calorie needs and make informed decisions.
Showcase images with an image carousel that rotates or slides visuals, improves design, and draws attention to key content.
Add customizable content cards to your site to display structured information clearly with flexible layout and design options.
Create course listings with a course catalog widget that displays programs clearly, supports easy organization, and helps visitors explore courses effectively.
Show LinkedIn posts in a live feed that keeps updates current, builds credibility, and helps visitors engage with your brand.
Show verified customer feedback with Google Reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
