File storage/management and images

highvoltage - January 1, 2009 - 19:54

In fooling around with drupal I'm seeing that it's file management, particularly with images, is very very bad. The main problem comes with organization and thumbnails, then the lack of file deletion when it is removed from a node, or the node itself is removed.

I find that when I upload a single image, several are created. There's an automatic thumbnail generation that comes from imagefield I'm guessing, possibly just drupal itself, that's one useless file not asked for. Then there's the imagecache presets, and finally there's the actual image itself. Essentially I have 3 images created from uploading one, and the only way to remove them is by finding and deleting them manually in the directory.

If you have hundreds or even thousands of images being uploaded, that's impossible to manage or moderate. I've looked in to filefield paths in order to better organize files, but there's still no way to have them automatically deleted when removed from the site.

How on earth do drupal users go about managing their files reasonably? Is there something obvious i've managed to miss?

Use add on modules

peterx - January 1, 2009 - 23:22

There are a lot of things that Drupal does not specialise in. Add on modules are used to provide the extra functionality. Are you using add on modules for image management? Have you looked at any?

I manage some sites using the FCK editor and the image management recommended for the editor. The users can see all the images in the editor image selector. It is an excellent approach for adding images to individual pages.

Image gallery sites usually add on an image gallery module and use the image management supplied with or recommended for the image gallery.

A shopping cart site would use the product image management connected to the product management part of the shopping cart.

petermoulding.com/web_architect

subscribing

-Anti- - January 2, 2009 - 00:32

When a file is attached to a node with the core attachment module, it is tracked as being part of that node, and so it *is* deleted when the node is deleted. It is the 3rd party modules you're using which are not tracking their uploads and are leaving their files on the server when the node is deleted.

> How on earth do drupal users go about managing their files reasonably?
> Is there something obvious i've managed to miss?

Nope. I don't think you've missed much. If you upload files any other way, the file is just something laying on the server that you link to from within content. There is no correlation between the file and the node(s) it is displayed in; thus the difficulty in 'tracking' which image or file is used within which nodes.

There are one or two modules which upload images/files/media as an actual node themselves, in their own right, but then their insertion and usage into other nodes is still not tracked in the way discussed above, so you have the same management problem.

Why is it like this? Bear in mind that the vast majority of websites want to grow, and so never really want to unpublish or delete content; when they get to big for the account, they just tend to increase their webspace. Additionally many websites run for a handful of years and then delete and start from scratch with newer technology, if they don't rely on search ranking or having a backlog of content.

The website I'm currently working on is in this minority; a school website which needs certain content and files to be cleaned and deleted every year, whilst other content is unpublished until needed again, and some content left alone. And yes, housecleaning it is going to be a nightmare; 8gb of space goes very quickly when you have 600 users uploading docs, pdfs, swf, avi and images. Some of the modules I hope to use to make it easier to manage are:
- IMCE + FCKEditor
- Views2
- Node privacy by role
- Upload path
- Broken Anchor

and I'm still looking for other solutions...

 
 

Drupal is a registered trademark of Dries Buytaert.