• Hello,

    I have a question which I think, or am hoping, is easy to answer. I just don’t know what I am missing… Basically, I am creating a WP theme myself and I want to add an image for one site as a background and a video for another side as a background. If I use my text editor (without WP) and use the following code for adding images / videos, it works perfectly fine. But when I copy & paste that same code into my WordPress files, the image or video will not show up. I googled a lot, but keep getting the same codes that I already have and that are not working for me in WP. If anyone could explain me what I am missing, that would be great!

    <video autoplay muted loop class="video">
        <source src="background.mp4" type="video/mp4">
      </video>

    <img src="image.jpg" alt="image" />

    • This topic was modified 5 years, 1 month ago by jana90.
Viewing 1 replies (of 1 total)
  • In WordPress, the pages are dynamically generated, with addresses that don’t exist as files on the server. So any media file references must use the complete URL. If you don’t use the full URL, the current address is used as the base, and that doesn’t exist, so it doesn’t work.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding Images and Videos will not work in WP’ is closed to new replies.