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.

Our next available supporter will start replying to tickets in about 3.04 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Christopher Amirian 7 months ago.

Assisted by: Christopher Amirian.

Author Posts
April 13, 2024 at 6:36 pm #15515116

ronaldT-5

I am trying to: View images on translated pages

Link to a page where the issue can be seen: alarme-maison.ca

I expected to see: Same images as on home-alarm.ca

Instead, I got: alarme-maison.

Screenshot 2024-04-13 at 2.34.34 PM.jpg
April 13, 2024 at 7:37 pm #15515160

ronaldT-5

I ended up manually retrieving all lost images one by one. WPBakery is anything but good. I'm now working with Elementor on the staging site.

April 13, 2024 at 7:52 pm #15515166

ronaldT-5

Actually, the only image I was unsuccessful at bringing back to work on the translated site is the two-color stripe at the top bar.

The image is stored at the following URL. Notice the domain is different from the one on the translated site. Could that be the reason why?

hidden link

Also, note that the above URL is within a CSS code as follows in Custom CSS page:

/* make use of an image as background to the page title bar */
#top-bar-wrap {
background-image: url("hidden link");
!important;
background-size: cover;
}

April 14, 2024 at 11:23 am #15515592

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

WPML can not understand the images added to CSS. But you can use a trick to point to only the French version of the website and add the proper image.

please add the CSS code below to your theme:

html[lang="fr-CA"] #top-bar-wrap {
background-image: url("<em><u>hidden link</u></em>");
!important;
background-size: cover;
}

Please replace:

hidden link

With the URL that you want to use for the image in French language.

Thank you.

April 14, 2024 at 1:46 pm #15515969

ronaldT-5

Hi, I'm afraid adding your suggested code does not work as-is.

BTW, I want to use the same image for both languages. Can I do that?

I do not know if this is related to my other issue (which I thought I had resolved yesterday). None of my background images appear on the French side. Yesterday, I reconnected all the images, one by one, within the French domain. But, this morning, all connections to the images are lost.

See for yourself: hidden link

Please note, this is my main, live production site. I do not know how long it has been like that. All I know, the business has been completely dead for 3 months now.

April 16, 2024 at 12:08 pm #15524937

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

If you want to use the same image inside CSS the some CSS should load on the second language unless there is something blocking.

I suggest that you test the steps below:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- - Go to "WordPress Dashboard > WPML > Languages > Language URL Format".
- Check the "Different languages in directories" checkbox.
- Click the "Save" button.
- Go to "WordPress Dashboard > Settings > Permalinks".
- Click the "Save" button to flush the permalinks cache.

This is temporary to see if the issue is still there or not after the change.

Also I'd appreciate it if you follow the steps below:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to "WordPress Dashboard > WPML > Settings > Media Translation".
- Make sure that all the enabled checkboxes there are checked.
- Click the "Start" button.
- Wait for the process to finish.

Having a backup is important as the steps above follows some database queries.

The first set of steps will check if the separate domain mode that you use has anything to do with the issue?

The second set of steps will determine wether the duplicate option was somehow deactivated on the page sand the iomaes are not duplicated to the secondary language.

By duplication I mean for the images on database entries not physical image duplication.

If the issue persists, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

April 23, 2024 at 3:49 am #15553415

ronaldT-5

Problem resolved