I found and tried the same function code as above by jimbo. It WOULD do exactly what I need, which is delete the original file and rename the 'large' file to the original file's name so that any WP gallery links, etc would still find an image.
However, when I upload images via the GF form (and BTW this is on a MU network site), the image gets put in /2011/07/filename.jpg every time. This is September so they should be uploading to /2011/09/filename.jpg. The function above finds the original file and deletes it (not sure why), but the $large_image_location returns the /2011/09 directory (which it seems it should), but there's no file there because it got uploaded to /07.
Feels like a bug to me, but I may not be understanding how GF handles uploads.
Thanks for any input.
Posted 10 years ago on Thursday September 15, 2011 | Permalink