WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16654 closed defect (bug) (duplicate)

Possible bug with the_post_thumbnail after changing upload_dir

Reported by: sayontan Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.1
Component: Media Keywords:
Focuses: Cc:

Description

I believe this is a bug in how the image thumbnail functionality behaves with reference to the uploads folder.

On a standard installation of WP when you upload images they go into wp-content/uploads. Now, after you have uploaded images, if you change the upload_dir to something else, say wp-content/new-uploads, then run the_post_thumbnail, it will return the location new-uploads even for existing thumbnails in wp-content/uploads. This becomes an issue because the image was loaded to wp-content/uploads and the function returns wp-content/new-uploads as the path resulting in the image not being found.

Is this intended behavior? I have checked ticket #13483, but that seems to talk about a different issue.

Change History (2)

comment:1 solarissmoke3 years ago

  • Component changed from Post Thumbnails to Media
  • Resolution set to duplicate
  • Status changed from new to closed

#10390. Currently Wordpress expects you to move the contents of the old uploads directory to the new one.

comment:2 ocean903 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.