Weglot blog

How to translate images on your WordPress site

If you’re planning to translate your WordPress site, it’s important to remember that there’s more to creating a fully translated WordPress site than just the text on the page — images also play an important role in creating a multilingual site.

With the right WordPress translation plugin, you can translate images so that you’re able to display different images, text, and image metadata, based on a visitor’s language.

This helps you create a better, more localized user experience, make your website more accessible in all languages, and improve your multilingual SEO, especially when it comes to ranking images in Google image search.

In this post, you’ll learn how you can use Weglot to fully translate images on your WordPress site with a simple step-by-step guide for localizing all aspects of your site’s visual media (including videos).

How to Choose a WordPress Translation Plugin for Images

When you’re looking for a WordPress translation plugin to translate images, it’s important to remember that there are multiple considerations for fully translating an image:

  • The image file itself. For example, using a different image URL for each language on your site. You can also localize the image filename for improved image SEO in Google.
  • Text on an image. If you display text on an image, you’ll want to be able to translate that text, too.
  • Image alt text. It’s important to translate this behind-the-scenes image metadata for multilingual image SEO and accessibility.
  • Image link. If you’re linking an image to another page, you’ll want to be able to change that link based on a user’s language.

The Weglot WordPress translation plugin makes it easy to translate all those image elements on your WordPress site, along with the rest of your WordPress site’s content, using a beginner-friendly interface.

Weglot starts by automatically translating your site’s content with automatic translation. Then, it gives you a convenient cloud dashboard to manually edit all of your translations, including your site’s images.

How to Translate Images in WordPress With Weglot

To make this example as comprehensive as possible, let’s say that you have something like the simple page below and want to translate it into French and localize it for a French audience:

There are a few things that go into localizing this setup:

  • Changing the image of the Statue of Liberty into a French landmark (for example, the Eiffel Tower).
  • Translating the text that appears on top of the image.
  • Translating the image alt text. Again, even though you can’t see this on the front-end of your site, it’s important for SEO and website accessibility.

Basic Setup: Configure Weglot and Enable Media Translation

To use the Weglot WordPress translation plugin to translate images in WordPress, you’ll first need to perform a few quick housekeeping steps to configure the basic Weglot settings.

First, you’ll want to enable Weglot on your site and choose your site’s languages. To do this:

  1. Install the Weglot plugin from WordPress.org
  2. Register for a Weglot account
  3. Go to the new Weglot tab in your WordPress dashboard
  4. Paste the API key from your Weglot account into the API Key box
  5. Choose your original language and destination languages

From there, Weglot will use automatic translation to translate all of your site’s content from your original language into your destination language(s).

Then, to enable the ability to translate images in WordPress, open your Weglot dashboard and go to your project settings. Then, use the toggle to turn on Enable Media translation:

Now, you’re ready to translate images in WordPress.

How to Translate Images in WordPress

Let’s start off with how to translate the image file itself so that you can use a different image for different language versions of your site.

To access Weglot’s image translation features, go to the Translations interface and then select Media from the Type drop-down:

If you don’t see Media as an option in the drop-down, make sure that you enabled media translation in your project settings — this feature is not enabled by default.

Then, you’ll see a list of your image files. You can hover over the URL to see the actual image, which helps you know what you’re translating.

To translate the image, you can edit the URL on the right-side to use a different image file for that language:

You can insert any image link, so this also gives you a chance to localize the image filename.

Now, visitors browsing your site in a different language — French in this case — will see a different image.

How to Translate Text on Images in WordPress

Next, let’s look at how to translate the text on top of an image.

There are two types of front-facing image text you might need to translate:

  1. HTML text that’s overlayed on the image. That is, the text is not part of the image file itself — it just appears on top of the image.
  2. Text that’s part of the image. You cannot edit this text on your website — the only option to edit the text is to upload a new image file.

In general, we do not recommend using the second approach because it’s not good for SEO or accessibility and it also makes it harder to make changes on your site. However, if you still want to use this approach, you can translate your image by translating the text on the image and uploading multiple image files as detailed in the previous section.

If you’re using the first approach — text that’s overlayed on the image, you can use Weglot to translate the text just like you would any other text on your website.

You can either edit the text in the backend Translations interface:

Or, you can use Weglot’s Visual Editor, which lets you click on the text on a live preview of your website:

How to Translate Image Alt Text in WordPress

While most of your human visitors will not see image alt text, image alt text plays an important role for search engines like Google and visitors who rely on screen readers. As such, it’s important to still translate image alt text to ensure an SEO-friendly and accessible multilingual website.

In Weglot, image alt text shows up as regular text, which means you can edit it from the Translations interface:

How to Translate Image URLs in WordPress

If you’re using an image to link to another page on your site, Weglot will automatically update that link to go to the corresponding page in the visitor’s chosen language.

For example, if the original link is yoursite.com/famous-landmarks, Weglot will update it to yoursite.com/fr/famous-landmarks for visitors browsing in French. You can also translate your URL slugs by using the Weglot URL Translate meta box in the WordPress editor.

How to Translate Image Sliders in WordPress

If you’re using multiple images in a slider (with or without text overlays), you can use the same basic approach to translate your images.

Here’s a quick example of an image slider and text caption that we created with MetaSlider:

You’ll be able to translate both the text and images in your slider from your Weglot dashboard right out of the box — there’s no need to look for special compatibility in your chosen slider plugin:

How to Translate Videos in WordPress

While we’ve focused this post on how to translate images in WordPress, you can use the same techniques to translate other visual content, too. Namely, videos.

Here’s an example of an embedded YouTube video:

If you open that page in the Weglot dashboard, you’ll be able to provide a different YouTube video to embed — all you need to do is change the URL to link to the new video:

Weglot Makes It Easy to Translate Images in WordPress

If you want to create a fully localized multilingual WordPress site, it’s important to translate images and other media content along with your WordPress site’s text content.

When you translate images, you ensure that visitors have a truly localized experience, and you can also improve your image SEO in Google and ensure better accessibility for multilingual visitors using screen readers.

To translate images in WordPress, along with all the rest of your site’s content, the Weglot WordPress translation plugin offers an easy-to-use approach that works right out of the box.

Whether you’re translating standalone images, image sliders, or content from any other WordPress theme or plugin, Weglot is ready to help you create a multilingual WordPress site.

Sign up for a 10-day free trial today and you’ll be able to translate images in no time.

About the author
Alex Denning


Try Weglot for free