WebP support Print

  • 0

Software Requirements:

As of 4.0.6650, the CMS has support for creating WebP thumbnails for the following:

  • Set/Scene thumbnails
  • Category thumbnails
  • Model thumbnails
  • DVD thumbnails
  • Bonus Item thumbnails
  • Cams Feed thumbnails
  • Tour thumbnails (only if using new tour image system as detailed here)

Steps on updating templates are detailed below.

Updating Templates:

Each area that will use WebP will need the following template files updated. New template files can be found here:

https://cs.elevatedx.com/newest_templates.php

PHP Templates:

These files should be replaced:

  • bonus.tpl
  • cams.tpl
  • functions/standard.tpl
  • globals/stddvdimage.tpl
  • globals/stdmodelimage.tpl

If you're looking to link to the webp version of the file in the tour, these templates may need to be updated:

  • tour/template_sections/update_table_preview.tpl
  • tour/template_sections/update_table_preview_model.tpl
  • tour/template_sections/update_table_preview_thumb.tpl
  • tour/header.tpl (if using elegantmodern, sleekmodern or classic theme)

Within functions/standard.tpl, the following functions are updated:

  • StdImage
  • StdCatImage
  • StdStoreImage
  • StdStoreCatImage

These functions will need to be updated, or added if not present in this file.

Members Area:

  • js/helper.js
  • js/modernizr.js
  • mime.ini

Tour area:

  • js/helper.js
  • js/modernizr.js (if present)
  • custom_assets/js/modernizr.js (if present)
  • js/responsive/modernizr.js (if present)
  • mime.ini

If Using EX Protect:

  • /elxprotect/mime.ini

Updating mime.ini will allow for browsers to show WebP images inline on the page instead of attempting to download the file when accessing the image directly.

Enabling WebP Support:

To Enable WebP support for members area thumbnails, to to the sprocket in the upper right corner and choose "Thumb Positions"

From there, when you edit an entry, there should be a checkbox on the bottom of the page to enable WebP

For Tours, this feature is only enabled if the system is using the newer thumbnail system. For more information on this, please check this article here:

https://cs.elevatedx.com/index.php?rp=/knowledgebase/361/Update-existing-tour-templates-to-support-GIF-or-MP4-files.html

If this functionality is in place on the tour in question, you can go into the tour itself and edit the tour:

 

You should see "Create WebP Images" underneath the section for GIF and MP4 support. If you wish to enable WebP, save this value to "Yes" and save the tour.

And that should be it. WebP files will be created when an admin either batches thumbnails, uploads new thumbnails, or recrops an existing thumbnail.

***Your server's version of ImageMagick will need support for webp enabled on your build. If not you will see this error in your admin panel:

"ImageMagick:
Please have your host install webp/libwebp for WebP image support."

Creating Files:

Once WebP has been enabled in either of the above places, the system will create a WebP file when:

  • Running thumbnail batches that add or replace existing images
  • Uploading new thumbnails
  • Re-cropping existing thumbnails

Note: There is currently no process in place for creating WebP files without replacing your existing JPEG thumbnails.

AVIF support:

Any template updates here will automatically make your templates also have AVIF support. AVIF support will require PHP 8.1 with a version of ImageMagick that has AVIF support built in.


Was this answer helpful?

« Back

This site uses cookies to personalize content and to analyze traffic. You consent to our cookies if you continue to use our website. Read our Privacy Policy to learn more. Please Agree or Exit