Skip to content

Used to check if images on a WordPress site have a WebP equivalent. If it doesn't find a WebP, it generates one, and replaces instances of the existing PNG/JPEG.

Notifications You must be signed in to change notification settings

Ciffone-Digital/webp_check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webp_check

A Python script to check if images on a website have a Webp equivalent. If none is found, the script will create one in the same directory as the discovered jpeg/jpg/png with the same filename.

This script is ideally configured to be run on a cron.

In order to actually serve the WebP images to users, you configure a webworker to handle requests. If your site is on Cloudflare, worker.js can be copied and pasted directly into a new Cloudflare worker.

If not, modify the code as needed to work with your application.

About

Used to check if images on a WordPress site have a WebP equivalent. If it doesn't find a WebP, it generates one, and replaces instances of the existing PNG/JPEG.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages