WooCommerce Importer cannot detect the MIME type of images
-
Hi There,
Is there any way to force the WooCommerce importer or
wp_handle_sideload
to treat an image URL as an image?I’m importing a bunch of products with variations and it’s working well, but it cannot grab the image from the URL. For some reason, even though the URL of the image is responding with the correct MIME type in the header (image/jpeg), the importer doesn’t treat it as such.
Writing to the log at certain points for whatever reason it doesn’t seem to realise the image is an image. An example image – which you can see there isn’t a file extension – is attached (I’m working locally).
Checking it for whatever reason I cannot figure out why it’s not.
- I’m doing an importer with another system (WP All Import) and it works fine – it’s because it cannot handle custom product types means we have to use the default uploader.
- Downlaoding the image and hosting it elsewhere works, but it’s unworkable (we have 5000 images)
- Allowing unfiltered uploads
define('ALLOW_UNFILTERED_UPLOADS', true);
produces another error. It uploads the file but it’s unable to attach it to the post. It doesn’t show as a media file but when I download the file I can open it as an image. - I’ve ruled out plugin/theme conflicts as I’ve only WordPress, WooCommerce and TwentyTwentyFour installed.
What would be ideal would be a way to force the WooCommerce importer in the CSV to treat the file as an image, even though for some reason it’s not able to detect the fact it’s an image.
Any ideas?
The page I need help with: [log in to see the link]
- The topic ‘WooCommerce Importer cannot detect the MIME type of images’ is closed to new replies.