Skip Navigation

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

Problem:
The client is experiencing missing icons in the header after adding WPML to their site. This issue might be due to an invalid attribute being added to the

<img>

tag used for displaying flags in the language switcher.
Solution:
We recommend inspecting the

<img>

tag for the flag using browser developer tools and ensuring it contains the correct 'src' attribute instead of 'data-src'. If the 'src' attribute is missing, add it back. To identify if a theme or plugin is causing this issue, switch to a default theme like Twenty Twenty-One and disable all plugins except for Elementor, WPML, and its add-ons. Then, check if the issue persists. If the icons appear correctly, reactivate the plugins one by one to pinpoint the problematic one. Remember to back up your site and database before performing these tests.

If this solution does not resolve your issue or seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If necessary, do not hesitate to open a new support ticket for further assistance.

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 2 replies, has 1 voice.

Last updated by Prosenjit Barman 1 week, 3 days ago.

Assisted by: Prosenjit Barman.

Author Posts
November 20, 2024 at 12:44 pm #16424607

IzzetN

Background of the issue:
I am trying to add WPML to my site, hidden link, to manage multilingual content.

Symptoms:
When I add WPML to my site, the icons in the header are missing.

Questions:
Why are the icons in the header missing after adding WPML?

November 20, 2024 at 12:48 pm #16424717

IzzetN

Hello,

WMPL icons missed on header, and this are size is very big how can ı make like wpml website.

Ekran Resmi 2024-11-20 15.32.50.png
November 21, 2024 at 9:32 am #16428083

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're facing. Upon inspecting the flag on your site, I noticed that the `src` attribute in the `<img>` tag displaying the flag has been replaced with `data-src`, which is not valid. Please refer to the attached screenshot for details.

Using the browser developer tools, I tested removing the `data-src` attribute and adding only the `src` attribute. As a result, the flag image is displayed correctly. You can see this in the following screenshot: hidden link.

By default, the `<img>` tag only includes the `src` attribute. It appears that something on your site is altering the default attributes of the image tag for the language switcher and injecting an invalid attribute. It could be possible due to a conflict between theme/plugins.

Could you please switch to a default theme like Twenty Twenty-One, disable all plugins except Elementor, WPML, and its add-ons, and check if the issue persists? If this resolves the issue, start reactivating the plugins one by one while monitoring the issue. This process will help identify the exact cause of the problem.

[Make sure to take a backup of the site and database before the conflict test]

Let me know the update. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

Screenshot 2024-11-21 151947.png