Hi,
I am using Image Resize Filter with IMCE and FCKeditor, and some crazy directories are being created when I upload. I uploaded and resized a photo into a test blog entry, and this the message it gave me:
Blog entry My first blog entry has been updated.
The directory sites/default/files/resize has been created.
The directory sites/default/files/resize/sites has been created.
The directory sites/default/files/resize/sites/default has been created.
The directory sites/default/files/resize/sites/default/files has been created.
The directory sites/default/files/resize/sites/default/files/u5 has been created.
I created another user and uploaded a photo to his blog (it's a multi-user blog site), without resizing the image. It didn't announce the creation of any directories (though a directory was created for the user at sites/default/files/u6).
To confirm that the problem is with Image Resize Filter, I created a third blogger and uploaded and resized an image, and got this message:
Blog entry Trying with a new user has been created.
The directory sites/default/files/resize/sites/default/files/u7 has been created.
I don't think the problem is with my Drupal/IMCE file upload settings, but you be the judge:
admin/settings/file-system --> sites/default/files
admin/settings/imce/profile/edit/3 --> u%uid
admin/settings/fckeditor/edit/[profile]
path to uploaded files --> %b%f/u%u
absolute path to uploaded files --> %d%b%f/u%u
Have I done something wrong? Ideally I'd like the resized images to land in sites/default/files/uUID/resize/
Thanks,
Andrea
Comments
Comment #1
quicksketchI've been thinking about this in my recent ImageCache reviews, where it uses a similar mechanism. Duplicating the files directory makes it so that we can resize any image on the entire website, including those not in the files directory. I'll considering moving this location so that it strips out the second files directory, effectly making this module only work on local files within the files directory.
After this change, the path will be sites/default/files/resize/uUID/ in your situation, since all the resized images are stored in a single directory managed by this module.
Comment #2
citronica commentedThat would be great!
Comment #3
quicksketchWell this was much easier than I expected. And it still works with images outside the files directory! Seems like an easy win. I'll make a 1.1 release with the fix shortly.
Comment #4
citronica commentedLooks good in most respects, though it seems to have an extra slash somewhere:
It created the directory in the right place, and the resized images landed there correctly. But when I deleted the node, it did not delete the resized image.
Comment #5
quicksketchThanks, I've see the extra slash issue also. Let's open new issues for these problems.
Comment #6
quicksketch#372502: Double Slashes in Img Source
#372500: Delete Files When Originals are Deleted (hook_file support)
Comment #7
quicksketch