There's no way around it. You have to sanitize the images URLs. I've written a python script to remove non-alphanumeric characters from the full path of each image.
Also, this version of Magento limits the image name to 90 characters by default. Some posts show a workaround for that.
I noticed that its image/jpg which causes this problem.
I simply replace the type as image/jpeg when the extension is jpg and it works like a charm.
//Getting path info
$contentType = pathinfo($saved_path, PATHINFO_EXTENSION);
if($contentType == 'jpg') $contentType="jpeg";
$content_Type = 'image/'.$contentType;
I try to get this extension working, no error at creation and activation of the module, the extension working fine because in storefront i have the white logo https://static.integromat.com/img/packages/magento_256.png, however my external images are not found: i use the following custom attributes (as text field with urls inside):
I was facing the same issue and I found what is happening at least in my case. I noticed that for products with the issue, the image don't has roles applied.
Just apply roles:
Of course It is a manual task, but I thing a script could be created to update the database (insert values into catalog_product_entity_varchar)
Example of data to be inserted:
After some research here is what I've found.
In Magento 2, you can use the following layout files to handle product type specific pages:
Had the same error on local environment.
The error was due to an nginx permissions error.
Running this on macOS with local brew services nginx.
Local dev env
brew services nginx, php7.2
Error in the /usr/local/var/log/nginx/error.log file was
[crit] 7566#0: *31067 open() "/usr/local/var/run/nginx/client_body_temp/0000000035" ...
It is normal Magento 2 behavior to load the image of the associated simple product of a configurable product when a customer selects the required options.
In this case you clicked the color black, so it tried to load pm80_black.jpg, but it seems it doesn't exist.
You should check the black simple associated product - which image is selected as base, small ...
did you check on the server that the file is physically there? the image path has been recorded in the database but it the file has been removed after, you will have a 404.
It's a 404 on frontend, but can you see the image in the admin panel ?
If so, try to flush the cache image from the admin.
system > cache management
On further checking this is actually working as intended, with the Admin and Catalog grid thumbnails, swatch images etc being changed. However to make it the first image on the product page, you need to change the order of the items in the
UPDATE `catalog_product_entity_media_gallery_value` SET `position` = '...