Background of the issue:
I am trying to fix an issue with images on the product translations on my site, hidden link. The problem occurs with the product images on the translated version of the site, e.g. at hidden link. The src value in the img tag is simply incorrect (should be hidden link as in the Danish version). I have tried using the 'Start' option in Settings-->Media Translations and have also tried removing and re-adding the image on both the original and translated products.
Symptoms:
The product's translation has an incorrect src value in the img tag, resulting in a missing featured image on the translated page.
The problem seems to occur when it is an image that was resized (scaled) on upload by WordPress due to a big image size.
Questions:
How can I correct the images for the translated products?
It sounds like the 2nd link is covering my symptoms rather than the first one. However, as I understand the code, it is only handling future image uploads. Can you confirm that?
Yes, you are right. If there is still an issue, please let me know. To test the problem, I recommend temporarily deactivating all the plugins except WPML and WooCommerce.
Could you assist me in replicating the issue? It appears to be easy to reproduce. I have made the following private message and included a link to the staging site.
I have tried to reproduce the issue. However, that did not succeed.
Actually, as far as I remember, the problem started after I regenerated thumbnails in CLI (https://developer.wordpress.org/cli/commands/media/regenerate/). It appears to me that WPML is picking an image, that does not exist on the translated products. However, on the original products, there are no issues.
It's possible that some database entries were corrupted after you performed that action. For instance, it could be a problem if the database entry _wp_attached_file of the wp_postmeta is blank or missing.
Are you experiencing the issue when uploading a new image? I don't think you mentioned this.
I can check to see if there is another workaround. If not, I'm afraid I am helpless because of corrupted database entries, and you will probably need someone to fix them unless you reupload the broken images.
I need to request temporary access (wp-admin and FTP) to your site—preferably to a test site where the problem has been replicated if possible—in order to be of better help. When you log in to leave your next reply, you will find the needed fields below the comment area. The information you will enter is private, meaning only you and I can see and access it.