WordPress.org

Ready to get started?Download WordPress

Forums

Image permalink 404 (8 posts)

  1. pieterg
    Member
    Posted 1 year ago #

    After updating to 3.5, the links to my images all give an error. If I load them in a thickbox, I get a 404. If I load them in the browser window, I am redirected to the post in which the image was included.

    I've tried to resave the permalink structure a couple of times. I also tried to edit the attachment.php file in my theme folder, still no result.

    The permalink structure is /%postname%/%filename%
    When I open an attachment, I get redirected to /%postname%/

  2. riversatile
    Member
    Posted 1 year ago #

    Hi,

    Do you have a image.php file in your theme ?

  3. pieterg
    Member
    Posted 1 year ago #

    Hi Riversatile,

    actually I didn't, but once I uploaded an image.php file it didn't make any difference.

    Any other ideas?

  4. riversatile
    Member
    Posted 1 year ago #

    OK.

    Can you paste the content of your attachment.php file in a paste bin ?
    http://wordpress.pastebin.ca/

  5. pieterg
    Member
    Posted 1 year ago #

    well, this is the file now to test if I get any results:

    ---- start attachment.php ----
    <?php
    die('image');

    ---- end attachment.php ----

    This is one of the url's:
    http://www.carpcrossing.com/de-opschepper/img_2615/

    you see that it redirects to http://www.carpcrossing.com/de-opschepper/

  6. riversatile
    Member
    Posted 1 year ago #

    I'm not sure :

    <?php
    die('image');

    should be there in an attachment.php file !
    And it miss ?> at the end.

    Did you try to make a copy of your attachment.php file and to remove it from your theme folder ?

  7. pieterg
    Member
    Posted 1 year ago #

    it shouldn't be there, it's just to test if the file gets parsed. If it would I would get the string 'image' on my screen. So my conclusion is that the image permalink doesn't work.

    Thanks for your help so far Riversatile.

  8. riversatile
    Member
    Posted 1 year ago #

    I understand now. I thought the issue could be in the attachment.php file.
    I will not be able to help you more, sorry.

Topic Closed

This topic has been closed to new replies.

About this Topic