Home

Lullabot

Lullabot Ideas

We know stuff. We empower you to know stuff too.

On Site Drupal Training

We'll come to you! Graduate from your own on-site courses and become Drupalistas!

FileField and ImageField 3.0 for Drupal 6 Released

Blog by Nate HaugApril 20, 2009 - 8:09pm

Today I released the final 3.0 versions of both FileField and ImageField for Drupal 6, bringing to close the long journey for a stable, final release of the de-facto CCK image handling solution.

A small time line (in dd/mm/yyyy format):

  • 05/10/2007 - Hook file proposed for inclusion in Drupal 6
  • 02/13/2008 - Drupal 6 released (without hook file)
  • 06/24/2008 - First alpha release of FileField 1.x for Drupal 6
  • 07/31/2008 - RC1 of FileField 2.0 scrapped to start on a new hook file based version
  • 08/08/2008 - First alpha release of ImageField 3.x for Drupal 6
  • 10/08/2008 - Hook file included in Drupal 7
  • 03/15/2009 - New betas of FileField strip out crufty APIs
  • 04/20/2009 - Final versions released

And here we are! Nearly 2 years after the original concept of hook_file() was created and the work on FileField 3.0 began.

Let's take a tour through the final version and see what we have!

The FileField Widget

Probably the most exciting improvement is the addition of upload progress indication. This enhancement requires the PECL uploadprogress PHP extension, but adds a real asset to sites that use FileField for podcasts, videos, or other large files.

The upload field in action. Uploading with the uploadprogress extension installed.

 

After uploading a file, a simple preview and additional fields become available. "Description" and "List" fields may be toggled per instance.

Support for Revisions and Translations

FileField contains a backport (or actually the predecessor) of hook_file(), which is now part of Drupal 7 core. This allows FileField to manage files across revisions and translations with ease.

The ImageField Widget

ImageField is now completely dependent on FileField for its data handling. This means less duplicated, less bugs, and more compatibility between add-on modules. If an add-on module works for FileField, it automatically works for ImageField. This means that ImageField is now purely a "widget" for CCK, not a "field" any more.

Setting up a new Image field is now based on the "File" field type.

 

Uploading an image is just the same as FileField, only an image thumbnail is shown in the preview.

For Developers...

Devel Generate

FileField now has full support for Devel Generate, so you can populate an entire image gallery with a single click. FileField respects minimum and maximum image sizes during content creation, with randomly generated images.

Generated content with populated file and image fields.

Hook file support

Other modules can use FileField's hook_file() implementation to help determine when and where a file is in use. This means modules like the new FileField Sources module can reuse existing images on multiple nodes, even use IMCE to browse existing images and reuse them (as long as the files are assigned an FID in the database).

Using FileField Sources or other to-be made modules, reuse existing images or files on multiple nodes.

An Extensive Public API

FileField contains some super-handy API functions that let you easily grab files or nodes from the database based on limited information:

  • filefield_get_field_list() - Get a list of file (or image) fields within a node type.
  • filefield_get_file_reference_count() - Count how many times a file is in use.
  • filefield_get_file_references() - Get a list of all nodes that use a particular file.
  • filefield_get_node_files() - Get a list of all files that are attached to a node within one or all fields.
  • Plus hook file and all the goodness it brings.

And other goodies

The long development cycle of ImageField and FileField didn't deter people from building on the alpha and beta versions, a lot of cool project have appeared to build on the flexibility of these modules.

  • FileField Podcaster and iTunes: Create podcast feeds using Views.
  • SWF Tools: Now contains additional formatters for FileField.
  • ImageField Crop - An AJAX crop on upload tool for ImageField.
  • Image FUpload - Bulk image uploader

The stabilization of these modules means even more projects will build on them in the future. With a final version done for Drupal 6, it's time to look forward to Drupal 7 and make FileField join its friends: CCK in core, ImageAPI in core, and ImageCache in core.

Comments

Greg (not verified) on October 9, 2009 - 3:21pm

Thank you Lullabot!

I think FileField Sources might just save my life on my current project. It's the only sensible and near-complete way of sharing File/ImageField files I've seen. Assets looks abandoned, Media looks great but has a long way to go - FileField Sources looks *perfect*. Nice work! =)

(Oh, and the other stuff is pretty cool too.)

photoshop services (not verified) on May 1, 2009 - 1:40am

Thanks!!

Congrats!!!

psynaptic (not verified) on April 26, 2009 - 6:24pm

Installation Instructions for PECL uploadprogress Extension

I just did a quick blog post on how to install the PECL extension. Hope it's of use to someone:

Installing PECL uploadprogress Extension for Drupal FileField 3.0 Module

steinmb (not verified) on April 22, 2009 - 8:45am

Tip: How to enable PECL uploadprogress extention in MAMP

Great Work! Based on the excellent article "how to Setup a Memcached-Enabled MAMP Sandbox Environment" have I put together http://smbjorklund.no/how-enable-pecl-uploadprogress-extention-mamp

Cheers!
Stein Magne

Jim (not verified) on April 22, 2009 - 5:15am

Added to DrupalSightings.com

Added to DrupalSightings.com

soxofaan (not verified) on April 21, 2009 - 6:28pm

Congratulations!

Congratulations! This looks very good. I hope this will help the convergence of image/multimedia handling in Drupal.

Gavin Doolan (not verified) on April 21, 2009 - 4:05pm

Amazing....

Amazing work guys, I love this module its fantastic. Great to have such great image manipulation tools.

Now I want to learn more about the API and see what it can really do! :)

Finkpad (not verified) on April 21, 2009 - 10:25am

oooh - looks great

I'm constantly moaning about image and video handling in Drupal.. switching through various modules like Acidfree, thickbox, lightbox, blah blah blah but never finding a nice simple image handler with text.

I will be giving FileField and ImageField v3 a whirl later today...

double thumbs up

Anthony Hersey (not verified) on April 21, 2009 - 3:58pm

I'm afraid you might be

I'm afraid you might be expecting too much out of these - most of the modules you list work with filefield/imagefield to do their fancier displays, although imagefield has been usable for "old fashioned" galleries for a couple years now. My drupal5 recipe for image galleries used imagefield and viewfield (and imagecache, custom pagers, fivestar, etc) on a couple content types. Acidfree is overkill, but thickbox, etc., might be for you if you want overlaid galleries or such.

Jon (not verified) on April 21, 2009 - 8:08am

Excellent

Thanks for all of you hard work Nate & crew! Love the new features especially the progress bar. The topic came up in our user group on why we still using the "throbber" and not a progress bar... problem solved.

yched (not verified) on April 21, 2009 - 4:55am

Amazing work. Thanks so

Amazing work. Thanks so much, Nate.
Looking forward to core filefield ;-)

joshmiller (not verified) on April 21, 2009 - 4:49am

under "other goodies" links

under "other goodies" links to the last two modules are incorrectly linked to lullabot.com.

Otherwise, WOOT!

Josh

April 21, 2009 - 10:14am Nate Haug

Thanks, fixed. :-)

Thanks, fixed. :-)

Jakob Petsovits (not verified) on April 21, 2009 - 2:04am

whoo

Nate! Nate! Nate! Nate!
dibs on dopry's eyebrows.

Jakob Petsovits (not verified) on April 21, 2009 - 2:33am

Side note

Also, I finally shut down FileField Image for good. The current usage count for FileField Image seems surprisingly high (597), but with the low number of people that are actually using FileField 6.x-1.x-beta3 (30, and that's the only compatible released version) it's more likely that people just have this module lying around doing nothing. It's just a plain hook that just doesn't get invoked if no module uses it.

April 21, 2009 - 4:40am Nate Haug

Excellent, thanks Jakob

Ironically ImageField is now essentially exactly what FileField Image was, conceptually at least, now that it's just a pure widget for FileField. If you get some free time (ha!) you're always welcome to hop back into action with any new ideas. :D

Jakob Petsovits (not verified) on April 22, 2009 - 2:00am

Nearly, but not exactly

FileField Image was indeed a widget like ImageField now is (*good job!*) with one exception:

Through the "suitability" stuff (and configuration), FileField selected its widgets and formatters on the fly, which means you could have a regular file and an image in the same multi-value field and the widgets/formatters would adjust to the mimetype.

It would be great to have that kind of "meta" stuff for the new FileField as well, although when I get back in a few weeks then (apart from my usual Version Control API push onto d.o) I might rather work on FileField-in-core, Field-Tool-in-core (maybe), and of course making Transformations rock for the end user. That should probably be enough for two remaining months, won't get more than that done :P

Brockdin Barr (not verified) on April 20, 2009 - 11:28pm

There's my F*@#in Image!!!

The subject line says it all... looking forward to giving it a whirl... Thanks.

Moshe Weitzman (not verified) on April 20, 2009 - 11:17pm

generate!

I'm so pleased to see full support for devel_generate. Nice one!

My clients will be so pleased to have a proper image module. Thanks.

Benjamin Melançon (not verified) on April 20, 2009 - 10:46pm

Hallelujah!

And congratulations. For the first time in memory there's no immediate client need for this but I'll be looking for excuses to install and play with it right away.

benjamin, Agaric Design Collective

Recent

Drupal Voices 160: Moshe Weitzman on Page Rendering in Drupal 7

Podcast 9.02.2010

Drupal Voices 159: John Albin Wilkins on Drupal 7 Theming

Podcast 9.01.2010

Drupal Voices 158: Emma Jane Hogbin on PHP for Designers

Podcast 8.31.2010

Command Line Basics: More Editing with Vi/Vim

Video 8.31.2010

Lullabot's Back to School Sale

Blog 8.30.2010

Popular

Drupal Voices 160: Moshe Weitzman on Page Rendering in Drupal 7

Podcast 9.02.2010

Drupal Voices 159: John Albin Wilkins on Drupal 7 Theming

Podcast 9.01.2010

Drupal Voices 158: Emma Jane Hogbin on PHP for Designers

Podcast 8.31.2010

Installing Memcached on RedHat or CentOS

Article 8.20.2009

Photo galleries with Views Attach

Article 6.01.2009
 
  • Home
  • Services
  • Events
  • Ideas
  • Store

Connect the Bots:

Twitter Facebook YouTube blip.tv All Posts Newsletter
  • Ideas
  • Blog
  • Podcasts
  • Videos
  • About
  • Contact
  • Jobs
  • Services
    • Training
  • Events
    • Training Workshops
    • Other Events
    • Conferences
    • Calendar
  • Products
    • Videos
    • Books
    • Swag
  • Ideas
    • Blog
    • Podcast
    • Videos
  • About
    • Philosophy
    • Team
    • Presskit
  • Contact
    • General
    • Work Inquiries
    • Mailing List