• I’ve uploaded some images into an image directory (using ftp, not the wp uploader) and am using them in a template (not in a wp post). Other images in this directory display just fine, but these won’t appear on the page. I get the broken image symbol instead. The image files are fine: they work on my local installation and also on other web servers. I think this might have something to do with permalinks (the template is for a new category), but I’ve tried hardcoding the images with absolute URLs and they still don’t appear. If I upload the image using the wp uploader and use that URL, the image will show, but I need these in my images folder and not in the media library. Any idea what could be causing this? Also, if I put the image in the root directory, it will appear. But again, I need to keep these in the images folder. Any help appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Can you post a link to an example page?

    Thread Starter fgshepard

    (@fgshepard)

    Yes, of course:
    https://ircpl.org/category/blog/revisiting-religion/

    I’ve placed 5 images in the middle of the page for testing.
    text-embellishment01.png and revisiting-religion-header.jpg are also present on the page just above, as the type embellishment below the italicized paragraph, and the header above it, respectively. These show up there because I placed copies of them in the uploads folder, as described in my initial post. But they don’t work when placed in my images directory. The large rounded rectangular photograph is in the same directory as these other images, and it shows up just fine. I know that the files are OK.

    also, note that the first of my test images in another directory, also called images, inside my theme folder. this also doesn’t display. Oddly, this is the same folder as the header image at the top of the page.

    Finally, I should note that I’m using CSS to display these in my real code, but my test code uses img tags. I just wanted to be sure that it’s not my CSS. But this is why you won’t see other copies of these images in the source code.

    Hope that’s not too much info!

    Thanks!

    The images aren’t being picked up because the .htaccess file (that is part of your custom permalink structure) is re-routing all traffic for the main domain through WordPress. This includes calls to your images sub-folder.

    The only direct workaround that I can think of is to try and catch requests to the images sub-folder and route them away from WordPress. Essentially that would mean amending your .htaccess file and redirecting calls to /images to https://ircpl.org/images before the WordPress ReWritee block. It does seem rather pointless and I’m not 100% sure it would work “as is” but it’s the only option I can think of right now.

    Thread Starter fgshepard

    (@fgshepard)

    Thanks for your response. The thing that confuses me about this is that some calls to those folders work properly while others don’t. What could account for the inconsistency? The unwanted behavior seems to apply only to files that i’ve added recently.

    The unwanted behavior seems to apply only to files that i’ve added recently.

    Possibly because you’re actually seeing cached copies of older images. These may disappear from your browser cache shortly.

    Thread Starter fgshepard

    (@fgshepard)

    I hope not. But we’ve been using WordPress for about 8 months and this behavior just started today. I haven’t changed any of the settings, so I can’t imagine what would have triggered it. Very puzzling.

    Thread Starter fgshepard

    (@fgshepard)

    So this definitely seems to be a permalink issue. I haven’t bothered to figure out the details, but all the old links are still working, and dynamic image calls to new images in the old folder still work well. It’s only the new pages that have this problem, and they have slightly different permalink structures than most other pages (they use child categories). I’ve worked around the problem by putting all the necessary images in a new folder within the “uploads” folder. I’ll report back when I have time to figure this out.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘images won’t show on certain pages’ is closed to new replies.