Media Uploader Inserts Wrong Post URL (3 posts)

  1. ianesque
    Posted 7 years ago #

    I have a reproducible problem with the Media Uploader where it screws up the Post URL every time.

    When I upload an image and under the Link URL section I tell it to insert the Post URL, it shows it this way:


    Obviously, when I actually publish the post it's supposed to insert the correct post URL. However, that's where it goes wrong. The correct post URL after publishing should be like this:


    But what it's doing is repeating the post title twice in the URL, like this:


    Following that incorrect Post URL that WordPress is inserting takes you to page with just a scaled down version of the media attachment.

    This is really annoying to have to publish, and then go back and correct the post URLs on all my inline image links.

    Does anyone have a solution? Thanks!

  2. Err.. Actually, that is correct behavior. Attachments get their own post which is a sub-post of the main post.

    In this case, your picture is actually named "cramps.jpg". That's where the second "cramps" comes from. The first one comes from the parent post, which you also named "cramps".

    Basically, your permalink structure is %year%/%month%/%day%/%postname%. The "postname" for the attachment post is "cramps/cramps" because its parent post is "cramps" and its own name is "cramps" as well.

    If your attachment was named "picture" then it would be http://www.regrettablemusic.com/2008/09/15/cramps/picture/.

    Also, that scaled down picture post is the actual attachment post. That is what you are supposed to see when you link to the "Post URL". If you want to link to the actual image file itself, then use the "File URL".

  3. ianesque
    Posted 7 years ago #

    Is there a way to get the Image Uploader to automatically insert the permalink for the parent post itself? That seems a lot more useful to me anyway, frankly.

    Many thanks, Otto, for clarifying!


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.