modxmodx-revolutionmodx-evolution

Template variable input type IMAGE but WebP file


I optimised my images and converted them into WebP format... image.webp

It seems to improve page speed significantly.

However, I have a template-variable IMAGE [blogpost-image] defined. Now with this .webp extension (= Chrome HTML document), I cannot open the IMAGES directory and add the images to my resource docs. I tried changing the input type to URL and also to FILE for my template-variable, but none seems to work.

How can I get my images in .webp on front-end with a template variable?


Solution

  • Take a look at the System Settings. Under Area: File System you should see the Uploadable Image Type setting (or similar depending on your MODX version). The default is a list of usual image file types: .jpg, .png etc. You probably need to add the .webp extension in order to upload those to the image browser.