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
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics 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 social share buttons so visitors share content to major networks, boost engagement, and drive more referral traffic.
Create course listings with a course catalog widget that displays programs clearly, supports easy organization, and helps visitors explore courses effectively.

Show Mastodon posts in a live Mastodon feed that keeps content fresh, strengthens your social presence, and helps visitors engage with your updates.
Use a payment button for secure PayPal or Stripe checkout to simplify online payments and help increase sales.
Add an events calendar to your site so visitors can view upcoming activities, improving engagement and event visibility.
Create immersive 360 virtual tours with interactive hotspots that let visitors explore spaces, view details clearly, and experience panoramic environments seamlessly.
Use a notification bar to alert users, highlight offers, and drive clicks that boost engagement, signups, and conversions.
Create interactive video polls that use engaging clips to boost participation, gather insights, and help visitors vote in a more dynamic way.
Create and customize product catalogs with a catalog widget that organizes items clearly, improves browsing, and helps visitors explore your offerings easily.
Use an image magnifier to let visitors zoom in on photos, view fine details clearly, and enjoy a more accessible and informative visual experience.
Create interactive infographics with a ratio widget that uses custom icons, dynamic tooltips, and clear visuals to help visitors understand data quickly.
Use skill flip cards to showcase your abilities in a clear, interactive format that strengthens your profile and improves your chances of getting hired.
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!
