WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Is there a way to make WP store photos according to the date of old posts? (2 posts)

  1. giovanealex
    Member
    Posted 6 years ago #

    Hi!
    When adding photos to a post, WordPress stores them inside the "uploads" folder on a year/month-based folder hierarchy. Well, it makes sense when you are writing a new post but it does not makes sense to me when you are updating an old post, trying to get rid of old gallery solutions in place of the new WordPress built-in media gallery. So, is there a way to avoid this default configuration and just make it recognize you are updating an old post, telling it must store the photos according to the date when it was first published?

    I hope someone could come with a solution for this with a plugin.

    Thanks in advance for any help

  2. giovanealex
    Member
    Posted 6 years ago #

    I've open a ticket on WordPress trac asking to implement this option on WordPress but someone closed the ticket giving this answer:

    Can be done easily in a plugin: filter upload_dir and use $_POSTpost_id?.
    04/02/08 20:49:55 changed by lloydbudd

    * milestone deleted.

    Ok, nice that there is a way to solve this. The problem is that I'm neither a developer nor a programmer. So, can someone write a few lines of code to implement the solution above suggested as a plugin? I would be truly grateful!

    P.S: "Add From Server" plugin developer has answered my trac entry saying that his plugin does something very similar, since "it sorts the files into upload folders based on when it was created". The problem is that I would not upload photos taken with digital cameras but internet image galleries, with no exif info - that is why I would like it to be stored according to the original publishing date of the post.

Topic Closed

This topic has been closed to new replies.

About this Topic