Support Forums - Classified Ads Script Osclass

General osclass questions => General discussion => Topic started by: morpheus93 on March 29, 2025, 11:06:23 PM

Title: Enable webp-image upload on posting ad site
Post by: morpheus93 on March 29, 2025, 11:06:23 PM
How can we enable the possibility to upload webp-images when posting an ad? Tried it on my localhost test installation and also on your demo (https://plugins3.abprofitrade.eu/item/new).

It does not work and always shows an error: "image.webp has an invalid extension. Valid extension(s): png, gif, jpg, jpeg.X", even on your demo site where the "WebP Images Generator Osclass Plugin" is installed and activated!

How can this be solved?

(https://i.imgur.com/q69nthy.jpeg)
Title: Re: Enable webp-image upload on posting ad site
Post by: mwindey on March 30, 2025, 02:53:07 PM
@morpheus 93

In file oc-includes/mimes.php underneath line
Code: [Select]
$mimes = array(
add   
Code: [Select]
'webp' => 'image/webp',
 
Title: Re: Enable webp-image upload on posting ad site
Post by: MB Themes on April 01, 2025, 10:45:13 AM
WebP Images Generator Osclass Plugin does not provide support for uploading webp images.
It generates webp images based on uploaded jpg/png images.
Title: Re: Enable webp-image upload on posting ad site
Post by: morpheus93 on April 01, 2025, 06:22:51 PM
@morpheus 93

In file oc-includes/mimes.php underneath line
Code: [Select]
$mimes = array(
add   
Code: [Select]
'webp' => 'image/webp',


Unfortunatley that does not work. Added 'webp'  => 'image/webp', to the array in oc-includes\osclass\mimes.php but same error on fileupload when a webp image is used.
Title: Re: Enable webp-image upload on posting ad site
Post by: mwindey on April 01, 2025, 06:34:21 PM
Full solution i wrote and use myself is here....https://forums.osclasspoint.com/osclass/facing-error-while-uploing-image/msg33117/#msg33117
Title: Re: Enable webp-image upload on posting ad site
Post by: morpheus93 on April 01, 2025, 10:47:40 PM
Full solution i wrote and use myself is here....https://forums.osclasspoint.com/osclass/facing-error-while-uploing-image/msg33117/#msg33117

Thanks, i had missed the DB part. Now it's working well.
Title: Re: Enable webp-image upload on posting ad site
Post by: mwindey on April 02, 2025, 08:36:44 AM
@morpheus93

Great  :P