*

questions

  • *****
  • 319 posts
Covert standard image to WEBP variant
« on: March 16, 2023, 09:34:25 PM »
Dear all,

How do we use the code below to replace the categories .png icons and convert them into webp variant?/

Thank you,

  Covert standard image to WEBP variant:
<?php echo wbp_image_to_webp($source_img_path, $target_img_path = ""); ?>

  Get WEBP url of standard image. If does not exists, generate WEBP image (return source img if webp could not be created):
<?php echo wbp_get_webp_img($source_url, $generate_if_missing = true, $generate_force = false); ?>

Marked as best answer by questions on March 20, 2023, 02:45:06 PM
*

MB Themes

Re: Covert standard image to WEBP variant
« Reply #1 on: March 18, 2023, 08:47:59 PM »
Whenever theme get image, wrap image url into function:
Code: [Select]
wbp_get_webp_img(... Img url ...)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots