Support » Fixing WordPress » Uploaded images goes to wrong folder/date structure

  • Hi all, first of all sorry for my english.

    For what I know, if I upload images from the Media Library these goes to an “upload date” (years/month) folder (name)… if I upload images from a Page these goes to a “page published date” (years/month) folder (name).

    For me, this is true until version 4.8.9… from version 4.9 ALL uploaded images (from Media Library or single Page) goes to an “upload date” (years/month) folder (name).

    All test are from fresh install, default theme, no settings change, no plugin… “Organize my uploads into month- and year-based folders” option checked.

    Images upload date: 17/03/2019
    Single “Test Page” published date: 27/11/2018

    In WordPress 4.7 – 4.7.13 – 4.8 – 4.8.9:

    images uploaded from Media Library goes to …/2019/03 folder… RIGHT
    images uploaded from single “Test Page” goes to …/2018/11 folder… RIGHT

    In WordPress 4.9 – 4.9.10 – 5.0.4 – 5.1.1:

    images uploaded from Media Library goes to …/2019/03 folder… RIGHT
    images uploaded from single “Test Page” goes to …/2019/03 folder… WRONG!!!

    From 4.9 version has anything changed in the way WordPress handles image uploads?
    If YES, how to go back to the old way (thus images uploaded from single “Test Page” goes to “published date” folder… and not to “upload date” folder)?

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello maximo71,

    Would be happy to help.

    Will you please help us with some sort of screenshot or small video so we can better understand this?

    Waiting for your reply,

    Thanks.

    I have also created a ticket in WordPress Core and will keep you updated if they respond.

    Thanks.

    In WordPress 4.8.9 (and previous versions):

    if today (18/03/2019) I upload images from Media Library
    https://postimg.cc/N9PzkNyy
    these goes to
    https://postimg.cc/JHDd6bJp
    RIGHT!!!

    if today (18/03/2019) I upload images from Page (note the published date 27/11/2018)
    https://postimg.cc/HJrZswvd
    these goes to
    https://postimg.cc/WDx9Ddxr
    RIGHT!!!

    If I do this test from version 4.9 to 5.1.1 the images goes to
    https://postimg.cc/JHDd6bJp
    regardless of whether I use Media Library Image Upload (RIGHT!!!) or Page Image Upload (WRONG!!!).

    How to go back to the 4.8.9 way (images uploaded from Page goes to “published date” folder… in this case …/2018/11 folder)???

    Thanks.

    Hello maximo71,

    Core team would like to know why for you the Folder Structure is the problem.

    What is that you are trying to achieve and what happens if the structure is not the way you want, so we can see if we have any turnaround for this.

    Thanks.

    I manage a photographer’s site with thousands of photos and it is necessary to link the photos with the individual pages as a matter of order and research (dashboard AND ftp… as is until version 4.8.9)… i want ftp upload folders must reflect the structure of the site for an easier management purpose.

    So the way wordpress handles uploads has changed since version 4.9?

    As I have already said for me it is essential that the images uploaded from a page end up in a folder (ftp) with the same date (year and month) of the page itself … an ad personam modification to some php pages would also be good (function.php?).

    Thanks.

    Thank you maximo71 for sharing your thoughts.

    But you need to be little descriptive with some example if possible.

    We will continue with your example,

    images uploaded from Media Library goes to …/2019/03 folder… RIGHT
    images uploaded from single “Test Page” go to …/2019/03 folder… WRONG!

    So what would change if the image is in /2019/03 folder or it is in 2018/11, as in front-end it is up to you how you programmatically manage the image view.

    Please share your thoughts so I can pass it to the Core team and they can guide you further.

    Thanks.

    The site (ftp) is already structured in this way by the previous versions of wordpress… thousands of photos stored in folders by publication date… from now on I would have other thousands of photos archived instead by upload date… it is a question of ORDER… nothing for which one dies… the same reason why the plugin like “WP Media Folder” exist (and I bought it)… ORDER.

    Given that the previous versions allowed this type of management to be obtained, I thought it was easy to come back… if possible.

    ORDER.

    If you could see how my pc file management is ordered… 😉

    Thanks.

    I see the ticket in WordPress Core.

    And swissspidy’s answer:
    ==============================
    Change made in 4.9.
    “When media is uploaded to a post, the upload directory is set according to the date of the post, so that the media URLs in the post match when the post was published.
    A page is a slightly different beast, pages often live for years, and are regularly updated to stay relevant. This change causes media uploaded to pages to use the upload date to determine the upload directory.”
    ==============================

    But for my test in 4.9 to 5.1.1 version this is not true.
    Also images uploaded to a previously published Post (as well as to a Media Library and to a Pages) use the upload date to determine the upload directory and not the date of the post.

    Thanks.

    • This reply was modified 10 months, 1 week ago by maximo71. Reason: Most accurate answer

    Yes, I saw you discussed.

    I would recommend to share your thoughts and the problem you are facing on core ticket we created.

    It might help.

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Uploaded images goes to wrong folder/date structure’ is closed to new replies.