Page 1 of 1

Upload webp and resize to webp

Posted: Thu Jun 23, 2022 7:04 pm
by bigdm
I have an issue, we are using import function to upload new products + images which our provider has now changed to webp, we have installed webp plugin which works fine, converting all current images to webp..

HOWEVER, the webp images we are importing are not being cached or converted??

Any ideas how we can do this? basically need it to check /image dir ... create cache / webpcache if .png .jpg or .webp

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 7:45 pm
by JNeuhoff
You really need to provide some more details if you want some help here.
What import extension are you using? What webp extension? Website URL?

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 7:46 pm
by IP_CAM
Checked here for possible Solutions on this already ?
https://www.opencart.com/index.php?rout ... earch=webp

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 8:31 pm
by bigdm
JNeuhoff wrote:
Thu Jun 23, 2022 7:45 pm
You really need to provide some more details if you want some help here.
What import extension are you using? What webp extension? Website URL?
This is the extension i installed https://www.opencart.com/index.php?rout ... earch=webp

Working fine, by that i mean its convert jpg / png to webp

HOWEVER, the problem I am trying to solve is the ability to UPLOAD Webp directly, (just as i can now png / jpg) .. I have imported some products with images already in webp = when i check info i can see details there /dir/imagename.webp .. however front end = wont show image, on checking source its not created the various sizes etc so not in cache folder


note using OC 3.36

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 8:33 pm
by bigdm
IP_CAM wrote:
Thu Jun 23, 2022 7:46 pm
Checked here for possible Solutions on this already ?
https://www.opencart.com/index.php?rout ... earch=webp
yes see above.. also checked for other solutions didnt appear to find one

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 8:39 pm
by JNeuhoff
Same question again: What import extension do you use?

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 8:54 pm
by bigdm
its custom made, creates entrys including image/path

So basically so in db they look like this product_image_id | product id | data/DIR/1152222162_3.jpg < IF jpg = no issue system is finding them, creating resized images and putting them into cache....... Which then gets cached again to cachewebp

however when we import webp product_image_id | product id | data/DIR/1152222162_3.webp >> Nothing happens, it doesnt (cant) create the resized images and add to cache

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 10:02 pm
by JNeuhoff
Well, in that case you'll have to find a professional developer on the commercial support section of this forum, to find a professional developer who can adjust your custom import accordingly.

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 10:43 pm
by bigdm
JNeuhoff wrote:
Thu Jun 23, 2022 10:02 pm
Well, in that case you'll have to find a professional developer on the commercial support section of this forum, to find a professional developer who can adjust your custom import accordingly.
understood, sorry i thought this would be where i should post it

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 11:10 pm
by halfhope
bigdm wrote:
Thu Jun 23, 2022 7:04 pm
I have an issue, we are using import function to upload new products + images which our provider has now changed to webp, we have installed webp plugin which works fine, converting all current images to webp..

HOWEVER, the webp images we are importing are not being cached or converted??

Any ideas how we can do this? basically need it to check /image dir ... create cache / webpcache if .png .jpg or .webp
Hi!
file:system/library/image.php

Code: Select all

if ($this->mime == 'image/gif') {
	$this->image = imagecreatefromgif($file);
} elseif ($this->mime == 'image/png') {
	$this->image = imagecreatefrompng($file);
} elseif ($this->mime == 'image/jpeg') {
	$this->image = imagecreatefromjpeg($file);
} elseif ($this->mime == 'image/webp') {
	$this->image = imagecreatefromwebp($file);
}
https://www.php.net/manual/ru/function. ... omwebp.php

Re: Upload webp and resize to webp

Posted: Thu Jun 23, 2022 11:16 pm
by bigdm
halfhope wrote:
Thu Jun 23, 2022 11:10 pm
bigdm wrote:
Thu Jun 23, 2022 7:04 pm
I have an issue, we are using import function to upload new products + images which our provider has now changed to webp, we have installed webp plugin which works fine, converting all current images to webp..

HOWEVER, the webp images we are importing are not being cached or converted??

Any ideas how we can do this? basically need it to check /image dir ... create cache / webpcache if .png .jpg or .webp
Hi!
file:system/library/image.php

Code: Select all

if ($this->mime == 'image/gif') {
	$this->image = imagecreatefromgif($file);
} elseif ($this->mime == 'image/png') {
	$this->image = imagecreatefrompng($file);
} elseif ($this->mime == 'image/jpeg') {
	$this->image = imagecreatefromjpeg($file);
} elseif ($this->mime == 'image/webp') {
	$this->image = imagecreatefromwebp($file);
}
https://www.php.net/manual/ru/function. ... omwebp.php
Thank you for your suggestion, but already tried that didnt seem to work

Re: Upload webp and resize to webp

Posted: Wed May 28, 2025 2:14 am
by Ankit11188
I'm using opencart 3.0.3.8
And from journal 3.2.0 enabled system>settings>>webp format

But
When i upload webp image from image manager it shows warning incorrect file type.

When i tried to upload webp image from file ftp client, .webp image gets upload and When i see on front end it show blank image just as you've shown in video

What can I do ?

Re: Upload webp and resize to webp

Posted: Wed May 28, 2025 4:46 am
by JNeuhoff
Ankit11188 wrote:
Wed May 28, 2025 2:14 am
I'm using opencart 3.0.3.8
And from journal 3.2.0 enabled system>settings>>webp format

But
When i upload webp image from image manager it shows warning incorrect file type.

When i tried to upload webp image from file ftp client, .webp image gets upload and When i see on front end it show blank image just as you've shown in video

What can I do ?
Contact the Journal support, this is not an OpenCart issue. Or use OpenCart 3.0.4.0 or 3.0.4.1, not the Journal3 framework.