Setting a dynamic path for imagefield uploads

Just a quick post to share this great little gem of a module: filefield paths.

This module allows you to set a custom dynamic path using tokens for your files or images uploaded through CCK's filefield or imagefield. Why is this great? Because it allows you to structure files on your server and avoid having thousands of files in the same folder. Without this module, you are limited to (useless) user tokens or one static upload path.

When you enable this module, you get a lot of extra node/date/content-type tokens and can easily configure an upload path like:


Now, all images in that particular node will be available in a folder named with the unique node-id. And imagecache will also respect this path to put its derivative images. This is really recommended when you build big sites with hundreds of nodes and each node has many images.

Tips for better Drupal usability

Read More »


This is the company blog of
Drupal specialist

We are located in Breda (Netherlands) and build websites using Drupal. More about us.

Content on this blog is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.

Creative Commons License

Recent Comments