Hi there,
Thanks for reaching out to us!
Can you try to temporarily deactivate our plugin and see if you are able to upload images to your portal in general?
I’m looking forward hearing from you!
Hello,
yes I can add images when I deactivate / remove plugin. The problem is that I/they added images in the new year I can not use compression and I do not know what the reason.
Thanks for your reply. Do you receive any error messages as to why it doesn’t work, either in your WordPress site or in the log files of the server?
Would you be able to share your findings at support@tinify.com?
Thanks!
A message from support that helped me solve my problem:
“The only explanation we have at this point is that somewhere in the process of uploading the image to your WordPress media library a different script or plugin changes the meta data of the JPG file to a format our plugin does not understand. Our plugin does not check for file extension, but looks at the meta data within the image to see if it can compress it or not. For JPG files the expected MIME-type is “image/jpeg”.
Wordpress saves this information in the wp_postmeta tables (see attached image), can you look for a specific image which fails (e.g. it2-2-1.jpg) and check what kind of Meta data is saved?”
Based on this, I found that the uploaded *.jpg images stores bad metadata. The “Compress JPEG & PNG images” plugin doesn’t work with them.
I found this function in my code that caused the problem:
/ *
Allow SVG file format
* /
function classifieds_mime_types ($ mimes) {
$ mimes [‘svg’] = ‘image / svg + xml’;
if (! current_user_can (‘manage_options’)) {
$ mimes = array
‘jpg’ => ‘image / jpg’, I replaced it with ‘jpg’ => ‘image / jpeg’ then it worked
‘jpeg’ => ‘image / jpeg’
‘gif’ => ‘gif’
‘png’ => ‘image / png’
);
}
return $ mimes;
}
Thank you for your help and apologize for my English. 🙂