Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where custom image sizes defined using

add_image_size("size-gallery-new", 380, 246, true);

function in WordPress are not being applied to images in translated versions of their website, despite working in the original language.
Solution:
We recommend running the "Regenerate Thumbnails" plugin for each language version of the site where the custom image sizes are not applying correctly. This action should help in applying the custom sizes across all languages. If this solution does not resolve the issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please do not hesitate to open a new support ticket with us for further assistance at WPML support forum.

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.

This topic contains 0 replies, has 0 voices.

Last updated by Kor 1 week, 6 days ago.

Assisted by: Kor.

Author Posts
April 14, 2025 at 9:40 am

marcoC-9

Background of the issue:
I am trying to use the add_image_size("size-gallery-new", 380, 246, true); function to define a custom image size. In the original language (Italian), it works as expected. However, in translated versions (such as English), the images do not use the custom size. I have tried using thumbnail regeneration plugins, re-uploading large images to avoid the WordPress "-scaled" suffix, and syncing media from WPML → Settings with the appropriate options enabled. Link to the page: hidden link. The English version of the page is only visible to administrators. Attached I send you an example. As you can see in the English version the images have the wrong size

Symptoms:
In translated languages, images remain in their original size and the new custom size is not applied. To fix this, we need to manually regenerate thumbnails for each language.

Questions:
What is the correct way to sync media in WPML so that WordPress automatically applies the custom image size size-gallery-new in all languages?

April 14, 2025 at 10:35 am
April 14, 2025 at 1:03 pm #16929601

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I've checked, and it looks like you'll need to run the "Regenerate Thumbnails" for every language. I ran the "Regenerate Thumbnails" for the English language as shown in the attached screenshot and it works fine now. Could you check?

Screenshot_30.jpg