Skip Navigation

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 1 reply, has 2 voices.

Last updated by Dražen 1 year, 9 months ago.

Author Posts
September 14, 2023 at 10:46 am #14395995

thomasG-122

So i have been battling with this, for long time. And even with WPML support, telling me to put make the picture round via css. But to no avail.

But what i said previously is that you actually hardcode the size. Well that was initially wrong, i have figured out what is happening.

When you upload your custom flag, via WPML. it gets physically resized by WPML to that small square image.

So even if you apply CSS and stuff, your image will never be round and nice

So here is the trick

First upload your round images
Go make your WPML language changer, edit the size of the images for example 25x25px fits quite good.

Then you will see it looks like shi* Yes, that is because WPML have resized the actual image.

Now what you want to do is login via FTP, go to /uploads/flags find the original flags, overwrite them with the round flags you previously uploaded via WPML.

Clear cache. Boom, beautiful round flags!! Without using any kind of CSS that does not work anyways because the actual images are resized.....

September 14, 2023 at 12:17 pm #14396869

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for sharing your steps, I am sure other users would find it helpful.

You can also try disabling WPML resizing via:

define( 'WPML_DO_NOT_RESIZE_UPLOADED_FLAGS', true );

- https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-flags/

Regards,
Drazen

The topic ‘[Closed] Here is the correct resolution to use round flags in WPML’ is closed to new replies.