BUG – wp_load_image and year/month image folders
-
Hi,
I’ve set up automatic CSS sprite generation on image upload for a particular custom image size. This has been working fine.
However, I’ve run into this odd bug where if I have my media uploads set to be organised by year/date and try to upload an image into a older post (older than current month) wp_load_image fails to find the new uploaded image. This occurs only when uploading images from within a post. Which makes sense.
wp_load_image assumes that the image is within the most recent month dated folder, say 12 for December. When the image is actually getting put into the dated folder that corresponds to the post date of the post which is say 11 for November.
I’m creating my CSS sprites within a ‘wp_generate_attachment_metadata’ handler.
Any ideas how to get around this?
Uploading from the media section works fine, as images are located into the most current date stamped folder.
- The topic ‘BUG – wp_load_image and year/month image folders’ is closed to new replies.