Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP image paths in WP pages to avoid absolute paths

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #28688
    Scorix
    Member

    I’ve been using the following php code in my template files, and it’s been working great.

    Code:
    /images/MyImage.png

    When I go to the WordPress Dashboard > Pages > Add New and try to use it in my pages though, the image doesn’t show up. I tried using this one as well:

    Code:

    but that doesn’t work either.

    Does anyone know what the problem might be? There surely must be a way to use the img-tag in pages and posts without having to use absolute image paths?

    I need to add over a thousand images, so by using absolute paths, I risk having to do a lot of work later if I should move around some files, or rename the theme or something like that.

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.