WordPress.org

Ready to get started?Download WordPress

Forums

Import (lots of) images into WordPress 2.5 Media Library (11 posts)

  1. Avinash Meetoo
    Member
    Posted 6 years ago #

    Hi all,

    I've upgraded to 2.5 this morning and I am mostly very happy.

    I've noticed the new media library and I find it great. I would like to import 360 images into it (from my previous blog posts). I've created the appropriate directory structure i.e. wp-content/uploads/year/month/filename and copied the 360 images but I can't access them from the Add Media window.

    Any idea what I should do next to make WordPress become aware of the images?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    You cannot upload images directly using FTP and have it work. WordPress is only aware of the images that are uploaded through its own upload functions.

  3. Avinash Meetoo
    Member
    Posted 6 years ago #

    Is this database-related?

    I have gone through the tables but I can't find any table specifically related to the Media Library:

    mysql> show tables;
    +--------------------------+
    | Tables_in_wordpress_db   |
    +--------------------------+
    | wp_ak_popularity         |
    | wp_ak_popularity_options |
    | wp_comments              |
    | wp_falbum_cache          |
    | wp_links                 |
    | wp_openid_associations   |
    | wp_openid_identities     |
    | wp_openid_nonces         |
    | wp_openid_settings       |
    | wp_options               |
    | wp_postmeta              |
    | wp_posts                 |
    | wp_term_relationships    |
    | wp_term_taxonomy         |
    | wp_terms                 |
    | wp_usermeta              |
    | wp_users                 |
    +--------------------------+
  4. Avinash Meetoo
    Member
    Posted 6 years ago #

    Hi Otto42,

    Is it possible (even by executing some custom SQL) to make WordPress 2.5 believe that those imported images are part and parcel of the Media Library?

  5. Webrocker
    Member
    Posted 6 years ago #

    There are the fields "post_type" and "post_parent", "post_mime_type" and
    "guid" in the wp_posts table.
    for example:

    post_type=attachment
    post_mime_type=image/gif
    guid=[yourblogurl]/blog/wp-content/uploads/2006/01/example.gif

    I have no idea how to re-import my mediafiles from older post that were uploaded via a plugin into the current media-library, though.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    WordPress makes a separate post for each image, along with various metadata. It also makes thumbnails and such. So, in theory, if you were to replicate all those steps, sure, you could make it work. But simply uploading the files through the interface would be far easier.

  7. Avinash Meetoo
    Member
    Posted 6 years ago #

    Yeah. But I have 360 of them :-)

    Anyway, it's not a massive issue (as the images are from posts I've already written and posted).

    Thanks all for your help.

  8. Evita
    Member
    Posted 6 years ago #

    This plugin can help you.

  9. Avinash Meetoo
    Member
    Posted 6 years ago #

    Thanks Evita.

    I've downloaded it and I get some errors. I'll look into those and try to find a solution.

  10. jokkesvin
    Member
    Posted 6 years ago #

    Hi. Is it possible to put a custom time & date stamps on the images you upload through the Add From Server plug-in?

    I have some images outside the new folder structure (in the root of "uploads"). I would like them to be in the right folder, which would be: "uploads/2006/01" and not be uploaded to the current date & time.

    Anyone?

  11. moserw
    Member
    Posted 6 years ago #

    Hi Guys,

    Use this plugin from http://dd32.id.au/wordpress-plugins/add-from-server/

    Works great and I have done so for my image library.

    moserw

Topic Closed

This topic has been closed to new replies.

About this Topic