Allow importing WEBP images

I bought Import extension today and tried to import my list but it keeps giving me error as images should be in jpg, jpeg or PNG format. My all image files are in webp format. It is purposely kept in webp format for better performance. How can i import using webp format?

In one of the posts, somebody mentioned to use below code snippets.

add_filter(
	'hivepress/v1/models/listing',
	function( $model ) {
		$formats =  ['webp'];
		$model['fields']['images']['formats'] = array_merge($model['fields']['images']['formats'], $formats);
		return $model;
	}
);

I do not have idea on how to use it. Can someone please help?

Yes, webp is not allowed in the listing form by default, I highly recommend to auto-generate webp versions of images using a plugin like LiteSpeed instead of pre-converting images.

The PHP code snippet seems to be ok if you want to allow webp, please try following these instructions How to add custom code snippets - HivePress Help Center

Thank you for your help. webp issue is partially resolved. I am able to link webp images from library but it creates another copy of image and links it. how can i stop that. I am having another issue also of importing URL or Checkboxes. my URL values are valid and starting with https://. Also Checkboxes have correct values in csv as asked in then import screen but still it is not working. can you please help? where can i check the logs

i am still having issue with duplicate copy of images. However, I figured out the attribute importing issue. Your tool has bug. When we assign attributes to categories, it cannot import the values. But if I make them global attribute (Not assigning attribute to any category), it can import and display the values.

Hi,

Sorry for the delay. Yes, we are aware of the attributes bug, and we will try to fix it in the next updates. Regarding the duplicate, please provide more details, what exactly does it mean from the library? Please note that the import does not check these URLs, if you are importing from that WP installation, it does not reuse these images, but creates new ones. Therefore, we recommend using any external URLs and generating WebP with LiteSpeed to avoid converting it before importing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.