Skip to content

DesignCart/dc_pswebp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DC WebP for PrestaShop

DC WebP automatically converts all images (JPG/PNG) to WebP on first display and replaces them across the entire store. No .htaccess rules. No server configuration. Works on every hosting and with every PrestaShop theme (8.x and 9.x).

The module creates its own WebP cache and serves optimized images instantly after the first conversion.


FEATURES

✔ Supports all images: • Product images (all formats and sizes) • Homepage sliders and banners • Module images (ps_imageslider, ps_banner, etc.) • Theme images and logos • Static graphics

✔ WebP on first display: • Converts image only once • No cron jobs • Fully automatic

✔ Own cache folder (modules/dc_pswebp/cache): • No changes to PrestaShop core • No risk during updates • Works on shared hosting

✔ No server requirements: • Does NOT modify .htaccess • Works with Apache, nginx, LiteSpeed, Cloudflare • No rewrite rules needed • Compatible with Friendly URLs and CDN

✔ Maximum compatibility: • Every theme • Multistore • Watermarks • PrestaShop 8 and 9


HOW IT WORKS

  1. PrestaShop generates HTML for the page.
  2. The module intercepts it using the actionOutputHTMLBefore hook.
  3. It detects every JPG/PNG inside src="" and data-full-size-image-url="".
  4. For each image: – Converts it to WebP (once) – Saves it to modules/dc_pswebp/cache – Replaces the image URL with its WebP version
  5. Next page loads use ready WebP files from cache.

INSTALLATION

  1. Download module ZIP.
  2. In PrestaShop admin panel: Modules → Upload a module → select ZIP → Install.
  3. Open configuration panel.

CONFIGURATION

The module contains two options:

• WebP Quality (1–100) Recommended: 80–90.

• Clear Cache Deletes generated WebP images from modules/dc_pswebp/cache.

After changing quality settings, clearing the cache is recommended.


REAL PERFORMANCE RESULTS

Slider 1920px: JPG: 600 KB WebP: 130 KB Difference: -78%

Product image (home_default): JPG: 90 KB WebP: 32 KB Difference: -64%

Cart thumbnail: JPG: 25 KB WebP: 9 KB Difference: -64%

Significant improvements in Google PageSpeed (LCP, CLS, INP).


FAQ

• Does the module remove original images? No, original JPG/PNG files remain untouched.

• Does it work with watermarks? Yes.

• Does it work with every theme? Yes.

• Does it require editing .htaccess? Never.

• Does it work in multistore? Yes.


LICENSE

GPL v2


AUTHOR

Design Cart https://www.designcart.pl

About

DC WebP automatically converts all images (JPG/PNG) to WebP on first display and replaces them across the entire store.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages