Skip to content

How to display an image instead of the video on mobile in Hestia ​

Hestia Pro has an option to display a video as the background of the Big Title/Slider section. This guide explains why the video doesn't play on mobile and how to show an image there instead.

The video doesn't work on mobile devices. Hestia Pro uses WordPress's core Header Video functionality, which is designed not to work on mobile devices. By default, the video header only loads on displays that are at least 900 pixels wide and 500 pixels tall. On smaller displays, the fallback image is displayed instead. You can add or change that fallback image from Appearance > Customize > Header Options > Posts & Pages - Header > Header Image.

Workaround A: Use a GIF as the fallback image ​

You can convert a short video (for example, a 27-second clip) into a GIF and use it as the default fallback image:

  1. Convert your video into a GIF with ezgif's video to GIF converter.
  2. Upload the GIF directly in the media page.
  3. Select the GIF on the header image page.

⚠️ Important: Make sure WordPress DOES NOT crop the image. If it gets cropped, it is converted into the wrong file format.

Workaround B: Display a different image on mobile ​

To display a different image instead of the video on mobile devices:

  1. Go to Dashboard > Appearance > Customize > Additional CSS and paste the following code:
css
@media (max-width: 899px) {
    .home .header-filter {
        background-image: url('http://hestia.local/wp-content/uploads/2019/03/palm-fruits.jpg');
    }
}
  1. Replace the image source on the third line of the code, between the url quotes, with your own image URL. In the example above, the image source is:
text
http://hestia.local/wp-content/uploads/2019/03/palm-fruits.jpg
  1. To get the correct URL for an image on your site, go to Dashboard > Media Library, click the image you want, and copy its URL. Then paste it between the quotes, as in the code above.

    Copying an image URL from the Media Library attachment details

  2. Click Publish in the Customizer.

Was this helpful?