Making the image module not suck

Events happening in the community are now at Drupal community events on www.drupal.org.
drewish's picture

Much like the event module, the image module has slowly gained a reputation as a crap module. I've been working for the last few months to turn that around, first working my way through the the issue queue closing a couple hundred issues, then by trying to fix bugs and implement some of the many, repeated calls for features (like being able to have images opened in a new window). If you're curious, you can read through the release notes to see what I've been up to.

With this post I want to start a conversation with the maintainers of the other image modules. I've got a few goals:

  • Feedback on the image module's APIs. I've seen way too much code that starts with a comment // copied from the image module.... Every time I see that it says to me that the APIs used by the module need to be refactored so it's easier for other module developers to do their job.
  • Feature requests. What's being done by another module that could be done better in the image module?
  • Coordinate releases. I think users and developers would be much happier to have all the modules updated and released at the same time.

So, here's a few issues, roughly in order of my priority, that I'd like to get some feedback on:

Comments

imagecache

ray007's picture

Maybe another topic for discussion could be imagecache integration: http://drupal.org/node/145071

--
best regards

    Ray

If you need a drupal developer contact me!

--
best regards

    Ray

If you need a drupal developer contact me!

I guess we, the image*

zoo33's picture

I guess we, the image* maintainers, should open up issues against Image as soon as we have problems interacting with the module. I am guilty of at least one of those "this is a copy of this-and-that" and doing crazy workarounds for something that would have been easy to solve with a nice little hook.

Great initiative!

/ Hannes Lilljequist – SthlmConnection

cuts to the bone

sime's picture

Much like the event module, the image module has slowly gained a reputation as a crap module.

Man, this is like dissing my grandpa! He fought through 2 world wars and the salad bar queue at the veteran's club. :'(

But seriously, I look forward to hearing about image.module's second life.

The Future

sun's picture

Due to several projects we're currently developing, I crawled my way through all those issue queues of Image, Image Assist, Imagecache / Transformer, Imagefield and *box (btw: jQuery Lightbox is out now!). IMHO,

  1. Image and Image Assist module suffer most from unclean and undocumented code. It's a pain to go through all lines trying to understand what certain functions do and why they do it that way. Cleaning the coding style is just one click away: Just give the Coder Format script a chance (see CVS resp.).
  2. Both Image and Image Assist include proprietary functions to create derivatives of uploaded images. If both modules would rely on Imagecache, the code size of both modules would shrink dramatically.

    @drewish: That would already eliminate the first issue on your list. Imagecache has built-in support for rebuilding derivatives. The same might be true for the ImageMagick issue.

  3. While I see a future for integrating Image Assist with Imagefield, I would predict that, in favor of custom CCK content-types, Image and Image Attach module will not be used anymore. (http://drupal.org/node/175812) The same is true for Views in favor of the Image Gallery contrib module.
  4. Almost all image-related modules suffer from too less maintainers. There are quite a few issues marked as CNR or even RTBC. On the other hand, after reviewing some of the CNW patches, I can understand why there are not enough co-maintainers. Just an idea: Giving all co-maintainers CVS access to each others projects might increase the pace.
  5. After all, image* module maintainers should try to stay on focus with the development. Most of them try to re-implement functionality that is partially or even completely implemented in other contrib modules. Better replace all of that stuff with function calls to those modules and add a dependency (if really needed) to the .info file. By doing this, you'll free up your resources from stuff that other maintainers already concentrate on.
  6. OT: Image or Image Assist is subsequently deleting some images from my sites. I'll file a patch, when I've found out, which one and why.

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

Coder Format

sun's picture

Sorry, that should have been http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/coder/scrip...

doh! Now I know that posts can be edited on g.d.o... ;)

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

Image

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week