This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | - | - |
| 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | - | - |
Supporter timezone: Asia/Jerusalem (GMT+02:00)
Tagged: Bug
This topic contains 11 replies, has 0 voices.
Last updated by T4ng 4 hours, 34 minutes ago.
Assisted by: Itamar.
| Author | Posts |
|---|---|
| December 3, 2025 at 3:19 pm #17631449 | |
|
T4ng |
I notice that, since last update, an image that's translated in the Media Translation, when used in a page, then translated in the CTE won't be translated anymore. The original image is served instead of its translation in the translated page. |
| December 3, 2025 at 11:33 pm #17632359 | |
|
T4ng |
Hi, I did further tests. It appears that the issue persists in a minimal environment. However, it took me some time, but I also noitced that the issue only seem to occur with SVG media files. SVG files, translated in the media translation, aren't translated anymore in the translated posts where they are added. Updating WPML to 4.8.6 doesn't solve it. I hope it helps. |
| December 4, 2025 at 10:24 am #17633450 | |
|
T4ng |
Just so you know. We have a fix, ready to patch. Are you interested? |
| December 4, 2025 at 10:49 am #17633572 | |
|
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, Sure, please share your findings with us. Thanks, |
| December 4, 2025 at 11:43 am #17633853 | |
|
T4ng |
Here is a readme.md explaining how we fixed it. hidden link |
| December 7, 2025 at 5:43 pm #17642261 | |
|
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, I appreciate very much the detailed documentation you provided, including the problem and its solution. I'm consulting our second-tier supporters about this case, and will keep you updated here. I appreciate your patience. |
| December 8, 2025 at 1:11 pm #17644080 | |
|
T4ng |
Hi Thanks. Best regards, |
| December 8, 2025 at 1:42 pm #17644229 | |
|
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, We are unsure of the steps to replicate the issue you describe. To investigate this issue, we created a sandbox site and added the Safe SVG plugin. This is because WordPress Media Library doesn't support SVG images. When trying to replicate the problem, we get mixed results. Sometimes it works when replacing an SVG image with the Media translation addon, and sometimes it does not. We have a sandbox site to test this issue. It would be awesome if you could help us and replicate this problem on it. Here is the direct access link. hidden link Thanks, |
| December 8, 2025 at 3:03 pm #17644551 | |
|
T4ng |
We also use the Safe SVG plugin to upload our SVG media. First, I think it would make sense to switch the editor from ATE/automatic translation to CTE, since that’s what we actually use. I’ll let you apply that configuration change. I can now see the issue on the page you created, Itamar: The image has a translated version in the Media Translation tool. On the other hand, I can see that the issue doesn’t occur on the other pages you created. Unfortunately, I don’t know how you translated those pages and media files: From what I’ve observed on our website, an image used in a page wasn’t translated when the page was translated — even though the image was correctly translated in the Media Translation tool. Once I managed to reproduce the issue in a minimal environment — first with one image, then with another, both in a native block and in a custom block using a native block — I assumed there was a bug specifically related to SVGs. I had already spent a significant amount of time investigating this, so I reported it to you and to my developer without digging further. So I’m not aware of cases where the issue occurs or not under specific conditions. All I know is that some of my images stopped being translated, and without the fix, I can consistently reproduce the failure. Still, I ran another test on your sandbox using the following steps: Did you take a look at the README? When I don’t know which specific steps lead to a translated SVG or to the original one, these explanations probably help answer that question. |
| December 9, 2025 at 10:11 am #17646619 | |
|
T4ng |
Hi, The difficulty in reproducing the bug through a user scenario (“click by click”) likely comes from the fact that the problem is structural within the code and related to the nature of SVG files. The issue is not how we create the content, but the fact that your code attempts to handle SVGs as raster images (JPG/PNG) without first checking their format. Here are the specific technical causes (based on our code analysis): Missing dimensions: Your code checks for or requires width and height. However, many valid SVGs do not expose these attributes the same way raster images do, or rely solely on a viewBox. Missing thumbnails: Your logic appears to iterate over image sizes (thumbnails). WordPress does not generate physical size variants for SVGs. As a result, when the code attempts to access size arrays for an SVG, it fails. Missing safety check: There is no condition such as if (mime_type === 'image/svg+xml') { return; } (or appropriate handling) before executing the standard image resizing/verification logic. We feel there is no need to reproduce the bug “visually”; what’s important is to secure the code so it doesn’t fail when the width, height, or sizes properties are missing or null. Overall, the issue we’re seeing seems to come from the fact that SVG handling is still a bit incomplete. There are situations where the code processes SVGs as standard images, which naturally leads to unexpected behavior — especially regarding size management. In addition to this, our analysis also highlights four further points, related more specifically to block handling, which would benefit from some adjustments to ensure fully robust functionality. The code fixes provided are a mix of AI assistance and human brain juice, but they should address the issues we’re encountering. |
| December 9, 2025 at 8:16 pm #17649384 | |
|
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+02:00) |
Thanks! I escalated this issue to our second-tier supporters. Regards, |
| December 10, 2025 at 6:58 pm #17653669 | |
|
T4ng |
Another specific issue I noticed, is that the CSS class wp-image-ID don't seem to translate properly, wathever the media format. I did a test on your sandbox: I feel this test is pretty basic, but obviously, something already goes wrong here. |


