Error importing image
-
I am getting an error importing a csv file with images like this:
https://s7d9.scene7.com/is/image/ScanSource/zebra-li2208blk
But I have no problem importing if the image is like this:
https://www.ssetechnologies.com/wp-content/uploads/2017/04/DS2208-1.jpg
Anyone know why?
-
Adding to this. I am using the WooCommerce built in import. The error I get is “Invalid image: Sorry, you are not allowed to upload this file type.” Is it because the link doesn’t have a jpg extension?
I found an article that said to add the following line to the wp-config.php:
define( ‘ALLOW_UNFILTERED_UPLOADS’, true );
I did it and tried to import again but it failed for a different reason:
Not able to attach “https://s7d9.scene7.com/is/image/ScanSource/zebra-ds2278sr00006zzww“- This reply was modified 1 year, 10 months ago by tgrahamsse.
Hi @tgrahamsse,
By default, the following image file types are supported in WordPress: .jpeg, .jpg, .png, .gif, .ico
You are seeing the error because the image you are trying to upload does not have any of these file extensions.
To upload image files of any other type, like you said, ‘ALLOW_UNFILTERED_UPLOADS’ should work. Please share the new error that you are seeing after adding the ‘ALLOW_UNFILTERED_UPLOADS’ line to wp-config.php. You can upload the screenshot on?https://snipboard.io?tool and share the URL here.?
For security reasons, it is recommended to remove that new line you added in the wp-config.php after you upload the desired files.
Hi Kaavya,
Thank you so much for your reply. This is the error I get after allowing unfiltered uploads: https://snipboard.io/xMCpOY.jpg
I think the reason the images it’s not able to attach is because the CSV product import expects the image links to be actual image links that end in a file name, which should directly open the image as described in this post.Please let me know if you have any other suggestions.
Thank you!
- This reply was modified 1 year, 10 months ago by tgrahamsse.
Hi @tgrahamsse ,
Looks like you want to add custom file types to your site, is this correct?
As @kaavyaiyer mentioned, WordPress supports specific file types to be uploaded, and if you attempt to upload an unsupported file type, the upload will fail.
Kindly note that custom code is beyond the scope of support we are able to provide here, however, if the change made to your
wp-config.php
file is not working as expected on your end, you can check out a workaround in the GitHub thread, here.Alternatively, you can use a plugin to allow custom file types to be added to your site by searching for
Upload any file type
in the www.ads-software.com plugin repository.Additionally, I found a helpful article on how this can be achieved with a plugin, you can find this here.
Hope this helps, and please let us know if you have any other questions!
Hi @roxannestoltz,
I don’t think this is a WordPress limitation. I can insert an image URL into a WordPress page when I select “Insert from URL” https://snipboard.io/ARWoyY.jpg.
Changing the wp-config.php allows the WooCommerce import process to complete but it will not attach the image to a product, I believe because the URL is a link without a file extension – https://s7d9.scene7.com/is/image/ScanSource/xplore-xslatel10.An image will attach to a product if I use a link with a file extension in the csv file I am importing like this:
https://www.zebra.com/us/en/support-downloads/tablets/xslate-b10/jcr:content/mainpar/columncontrol_ba02/col1par/imagecomponent_a65e/image.adapt.1280.jpg/1549399731574.jpgThe problem is the csv file I am using to import products contain image URLs without file extension and there are thousands of products in the file.
I have tried importing products using another plugin and have the same issue.
Do you have any other suggestions?
Thanks!
- This reply was modified 1 year, 10 months ago by tgrahamsse.
Hi @tgrahamsse
I don’t think this is a WordPress limitation. I can insert an image URL into a WordPress page when I select “Insert from URL” https://snipboard.io/ARWoyY.jpg.
I replicated the scenario on my personal site using this URL to be uploaded, however, I am getting the error message below, hence, the upload is unsuccessful:
The problem is the csv file I am using to import products contain image URLs without file extension and there are thousands of products in the file.
I agree with this one since I’ve tried importing a product using this URL under the Images column of my CSV file, however, still it is unsuccessful.
Once again, posting below the Images Guidelines when using the built-in Product CSV Importer and Exporter
- Images need to be pre-uploaded or available online to import to your store.
- External URLs are supported and imported into the Media Library if used, provided the images are directly accessible and not behind a redirect script (as happens on some cloud storage services).
- You can define the filename if the image already exists in the Media Library.
Do you have any other suggestions?
I did some research and found these articles could be a good starting point:
Meanwhile, you could also get some ideas on these links since another solution would be customization:
- WooCommerce Developer Resources Portal
- WooCommerce Advanced Facebook group
- WooCommerce Community Forum
- WooCommerce Developer Slack Channel
- Hire a WooCommerce Expert
Hope this helps!
I have a similar situation It is due to the format of the image. Here is the image link in the .csv file: https://dks.scene7.com/is/image/GolfGalaxy/22EOPUGLFFRVRTRNNTRN Woocommerce does not allow import of images like this, I download photos to my computer and upload them in the Media section completely normal. But cannot import. Help me
Hi @mitech1333 ,
I understand you are having a similar issue as the one mentioned above, yes?
In order to align with?forum best practices, please create a new topic so that we can address your issue(s) separately. You can create a new topic here.
Thanks for understanding!
- The topic ‘Error importing image’ is closed to new replies.