• I have been using images in my root/images/ folder. How can I direct the WordPress 2.5 Media Library to look there for the images so when I create a post and click on “Add Image”, those file will show up? Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Settings > Miscell > change the upload dir

    Although the visibility of those images in the Add image menu would depend on when were they uploaded (i.e. using which version).
    Explanation: in earlier versions WP did not create an “entry” for uploaded images as it does in 2.3.x and 2.5 (those “posts” have the post_type attachment in the DB). WP sees only those images that have such an entry in the DB.

    Thread Starter sammy123

    (@sammy123)

    Thanks moshu for the advice. But, I did not upload the “old” images using WP before. Would it still work? If not, any workarounds? Thank you.

    If they were not uploaded using WP – no, it will not work. More exactly, you can insert them into any post if you know the exact URL for their location but you will not be able to see and insert them via Add Image, Media library etc.

    Thread Starter sammy123

    (@sammy123)

    Is there any way to retain the file location and name, but append the needed “post_type attachment” that WordPress does usually via it’s upload manager? Thanks!

    @sammy123

    All of the media content in your posts, such as images, etc. have links pathed back to your root/image directory. I don’t believe there’s going to be a one click solution to repath every link to every image in every post. You can go forward, but not backwards here.

    So this:

    Is there any way to retain the file location and name, but append the needed “post_type attachment” that WordPress does usually via it’s upload manager?

    No, not so much. But, you can repath the upload directory for future uploads, but you won’t be able to read all of that metadata and thumbnails into the media gallery from what is already loaded in root/images

    Thread Starter sammy123

    (@sammy123)

    If I do this manually and upload the images using WP 2.5 Media Library, is there an automated way to upload all my posts (change the image location)?

    @sammy123

    You’re not reading what I wrote. There is no way to automatically repath every image link in every single post on your blog.

    You can do this:

    1) You can upload all of your images into your media gallery, manually

    2) You can manually edit every single post and replace the image currently there with an image you’ve uploaded into the media gallery.

    Or, you can leave it alone and just go forward. Your site does need that root/image directory, so I wouldn’t be thinking about making it go away if I were you. I mean, the new Media Gallery in WordPress is nice, but it isn’t Picasa, kwim? You really only need it for future posts, unless you use the same image over and over, and if you do, just upload it into the gallery and use as you need. It isn’t hurting your site to have your older image links pathed to the root/image folder.

    there’s definitely a market for an attachment updater plugin that trawls a directory of your choice and adds all the images as attachments.

    Thread Starter sammy123

    (@sammy123)

    Agreed Ivovic!

    Thread Starter sammy123

    (@sammy123)

    It isn’t hurting your site to have your older image links pathed to the root/image folder.

    There is bandwidth and efficiency issues. If you have archive, search, and author pages that have the same image from two diff. locations, they will individually be downloaded and load… Server and user resources…

    and in my case I’m using shadowbox/thickbox plugins so this root/image path actually makes the link go to the image without the page or css layout… just a blank page with the image on it. I want it to go to same layout but only the picture on it and I can’t do that unless I use direct file path rather than the root/image . extremely vexing that everytime i change that and then I press publish or “update page” and it changes all back to default!
    Surely we can come up with something that can directly edit the field in the db table on it and keep it that way?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to Define the Media Library Directory Location?’ is closed to new replies.