Home > Drupal > Finally a good Drupal image module

Finally a good Drupal image module

August 15th, 2007 tony Leave a comment Go to comments

After trying out every Drupal module and combination of modules out there for image upload I was still frustrated and decided to design my own. I wanted to be able to:

  • Upload an image
  • Have thumbnails generated automatically
  • Specify size to resize to of one or both of the thumbnail and big image
  • Browse and choose images from my uploaded library, specify float, alt attributes, link to options, and have the HTML generated for me and pasted into my node at the current cursor position.

I really like the image upload feature built into Wordpress but it lacks in just a few areas:

  1. Thumbnail resizing is hard coded to a very small image that you can’t change
  2. You can’t resize the main image after uploading so if you have a very large image from your digital camera you can’t make it a reasonable size for the web
  3. You can’t have WP insert float left or right into your image tag for you which is something I do a lot in blog posts and Drupal sites.

So I designed this new Drupal image upload module, Image Picker to function just like the Wordpress image upload but with all the extras I want.

Download Image Picker

Here are some screenshots:

Upload an Image
Image Upload

Insert Image into Node
Image Upload

Browse All Uploaded Images
Image Upload

Edit an Image You’ve Uploaded
Image Upload

All of these features can be performed from within new/update of a node just like Wordpress so you can upload while you compose your content. For more info on use, see the readme file in the module. This module is only for Drupal 5.xx. I’d like to thank Algirdas Simutis for all of his hard work on this module I was so picky about :)

Download Image Picker

Categories: Drupal Tags:
  1. theKeyper
    August 15th, 2007 at 18:44 | #1

    You should probably have a look at the picture module(http://drupal.org/project/pictures) – a very new module which I believe has a lot of potential. (http://drupal.org/node/166372)

  2. Chris
    August 15th, 2007 at 20:46 | #2

    Drupal needs more people working on elegant image solutions. Thank you for your efforts and for making your work available. Don’t pay too much attention to all the people knocking you for not contributing to one of the existing modules. It would be ideal if there was 1 perfect module instead of 5 different solutions but the fact is that different sites have different needs and there isn’t really an ideal solution for every situation in the case of image management.

  3. tony
    August 15th, 2007 at 21:32 | #3

    Hey Chris, thanks for the comments. Don’t worry. I’ve been around far too long to let comments about my open source etiquette get to me.

  4. Jaeden
    August 18th, 2007 at 18:44 | #4

    hi i enjoyed the read

  5. Nettle
    August 29th, 2007 at 17:25 | #5

    I think this module is fantastic! Drupal may be a powerful CMS, but WordPress is so much more loveable. The reason is because of features like image picker…thanks for making Drupal more intuitive!!!!!

    One request…it would be nice to be able to use a border in uploaded pics- the kind of border, for instance, which you use in the thumbnail gallery. Any idea how this could be implemented?

  6. Tom
    August 31st, 2007 at 09:30 | #6

    I would weep with joy if this worked with relative paths, and was able to show Flickr photos too :-)

    Seriously, image management in Drupal is a nightmare if you’re just starting out like me, and just want something easy to use, right there on the edit page, which is what Image Picker is.

    Trying out Image, Img_assist, imagecache etc, not to mention multiple versions of etc etc is a nightmare.

    Thank you very much for this.

  7. tony
    August 31st, 2007 at 14:55 | #7

    I agree relative paths and Flickr would be a great addition/change.

    Can someone help me get this submitted to Drupal CVS? I’ve never done it and they want me to read 1k documents before contributing. I just don’t have the time but would love for this module to get contributed and improved upon.

  8. September 6th, 2007 at 16:27 | #8

    This is a great module! Very user friendly.

    One thing I noticed, the background color of the image picker window is inheriting the background color of my site theme, which is unfortunately a deep blue, and unattractive. Attempts to alter the css have proved fruitless so far…

  9. September 18th, 2007 at 22:32 | #9

    Hi man!

    Great, very great module, all i need…

    But i have a problem, and i’m complete noob in CSS…


    How i solve this?

    I complete buried because of this problem, therefore this plugin is everything that I need :(

    My site theme is the problem? See: tiagosilva.org

    Grateful for any clarification.

    PS: i´m brazilian, sorry for my english.

  10. September 18th, 2007 at 22:33 | #10

    Hi man!

    Great, very great module, all i need…

    But i have a problem, and i’m complete noob in CSS…


    How i solve this?

    I complete buried because of this problem, therefore this plugin is everything that I need :(

    My site theme is the problem?

    Grateful for any clarification.

    PS: i´m brazilian, sorry for my english.

  11. September 26th, 2007 at 17:43 | #11

    Did you mean to add the .svn folder to the zip folder. I only say this because I sometimes forget that when zipping. It caused a moment of confusion when SVN stopped working when I tried adding the module to my repository.

    This looks like a good module, testing it out now!

  12. September 28th, 2007 at 09:52 | #12

    Some notes after trying to get this to work:
    In your imagepicker.css, please please please remove –
    body{ background: white !important; }
    and tbody { border-top: 0; }

    If you don’t want to remove those, please don’t apply them ‘globally’ (ie, add a specific class to you body tag)

    Also, my setup used a prefix on the drupal database. This causes conflicts when your module looked for the filter_formats and filters DB tables. To fix this, simple wrap the table names in you sql query with { and }.

    So line 35 and 36 of imagepicker.module goes from:
    FROM filter_formats AS ff
    LEFT JOIN filters AS f USING (format)
    FROM {filter_formats} AS ff
    LEFT JOIN {filters} AS f USING (format)

    I don’t mean to criticize, just wanted to help you improve the module. I still haven’t tried it, but I hope to soon!

  13. September 28th, 2007 at 10:40 | #13

    Looks like a great plugin! Unfortunately I’m having a problem with my img tags not being saved. I successfully upload and image, choose attributes and hit submit, but then on the page where I saved it there is no img tag! I’m using Drupal 5.1 and just grabbed the plugin yesterday. Any ideas?

  14. September 29th, 2007 at 12:31 | #14

    LOL, do I smell Algis?

  15. October 1st, 2007 at 14:00 | #15

    great module!
    I am running into an odd problem though: I can upload a pic but when I try to insert it in the text, it doesn’t do it. I need to type the link manually.
    I had TinyMCE and it worked fine, but I got so many issues with it that I removed it and since then, ImagePicker doesn’t insert the links into the text anymore. Does anyone have an idea?

  16. Dan
    October 7th, 2007 at 00:38 | #16

    I like this module. Nice and simple. I have made it work with Full HTML, as you have noted in the Readme file, but I was wondering if you had any ideas on what tags would need to be included in Filtered HTML to make the floating work.
    Good job and hopefully we can see something come out of this.
    Also, I could imagine this module looking really good with some (forgive me for what I’m about to say) “Ajaxy” goodness.

  17. October 9th, 2007 at 15:28 | #17

    You might want to strip the .svn directory out of the tarball.

  18. October 9th, 2007 at 15:29 | #18

    You might want to remove the .htaccess file and .svn directory from the tarball.

  19. Nanda
    October 14th, 2007 at 14:45 | #19

    Thanks so much! :)

  20. October 15th, 2007 at 21:24 | #20

    Wow – very cool; however, I installed version 6 beta of Drupal on my site. The module reports “This version is incompatible with the 6.0-beta1 version of Drupal core.”

    Is there any way I can hack the module so it will work with 6.0? Is there a 6.0 release planned?


  21. October 23rd, 2007 at 07:19 | #21

    Very good module, congratulations!

    However, there is a little think I wish to make it perfect:

    As I use always the same options in my images, I wish a manner set the default options so that I haven’t so set each time the image size, thumbnail size and so on.

    Thank you very much

  22. November 2nd, 2007 at 07:24 | #22

    Great module, thank you very much! :)

    Just to queue up some more suggestions: inserting images appears not to be working in “text” mode but only with TinyMCE enabled. The ability to select the default options would be useful and comments on images perhaps too…

  23. November 5th, 2007 at 15:56 | #23

    Hi Tony, looks like you dont support this module anymore..? The module is GREAT, however still buggy (Alex is right about everything – table name, CSS). Thanx for your work, hope u did not give up on it:-)

  24. Diaz
    November 15th, 2007 at 23:06 | #24

    Thanks for the module..

    but i have some problem…
    authenticated user cant used this module?

    only site administrator can used this module…

    cant you help me..

    i’m indonesian,,sorry with my english

  25. November 16th, 2007 at 05:19 | #25

    Hi Tony, Module is very good but I’m using 5.2 version of Drupal and I’ve had many problems with permissions table (module doesn’t appear in this secction) and I have to dissabling it after each use.


  26. November 21st, 2007 at 18:04 | #26

    For some reason, the module will not ‘insert’ the image into the text I am editing, I have to create the link by hand.
    Also, after previewing a post, the interface is always ‘unfolded’, even if I folds it before clicking on preview.

  27. Ayner
    December 2nd, 2007 at 13:21 | #27

    Looks like the dude gave up. Pathetic.


  28. December 2nd, 2007 at 14:51 | #28

    @tony: drop me a line, if you’d like to move this to the Drupal CVS as you explained. It is always a good idea to have your project hosted there, as others might be able to pick it up, if you need to abandon it because of other personal commitments. You get the joy of all the packaging and bug reporting infrastructure, etc.

    My contact form: http://drupal.org/user/4166/contact

  29. December 15th, 2007 at 23:46 | #29

    @Tony … i already install imagepicker module, already in full html but the image still not appear … Can you help me ?

  30. William
    December 17th, 2007 at 18:12 | #30

    I fixed the problem of the cut-off of the form on left side within the iframe.

    Go to: imagepicker.css

    #imgp {
    clear: both;
    padding-top: 10px;

    TO THIS:

    #imgp {
    clear: both;
    padding-top: 10px;
    padding-left: 30px;
    padding-right: 30px;

  31. Kes
    December 18th, 2007 at 08:14 | #31

    Why when I upload an image, does it just insert the title (the alt text) in to the page and not the picture?

    When I try viewing the page I cannot see it… What am I doing wrong?

  32. January 4th, 2008 at 14:47 | #32

    I have the same problem as one person. I can only use this module with admin, authenticated users, it doesn’t show up. I am using drupal 5.5

    I have to say, it’s neat and quick. I was looking at node image Module and that was very interesting. I was able to set that up with permissions, and also enable or disable it per content type. But in the end that did not show a tab which was what the instructions said.

    I would have to say if you could some how merge these two modules Image Picker and Node Image You would have the perfect image module.

    Great work by the way. I’m using it in limited capacity as admin only.


  33. joel harrison
    January 7th, 2008 at 12:06 | #33

    same problem: bkgd image showing up in image picker admin area. completely ugly and completely no solution! God help us all!

  34. pzucchel
    January 8th, 2008 at 03:14 | #34

    ..same problem! only admin sees the module…

  35. January 10th, 2008 at 14:02 | #35

    I got stuck on this too, and then I did the obvious thing…read the readme.txt notably:

    2. Enabling imagepicker
    Only users who have the right to use Full HTML filter will be able to use imagepicker. This is done because Imagepicker uses some HTML, which will be stipped out if user will not use this filter. Users, who has the right to use Full HTML filter will be able to use Imagepicker instantly after installation. If you want to enable Imagepicker module for other users, you will have to
    reconfigure filters.

  36. Alex Kahn
    January 18th, 2008 at 14:58 | #36

    I agree with Antonio. My needs still seem unmet: images as nodes for convenient gallery creation, with integration into a WYSIWYG editor so that users can choose from these images (not crudely through folders on the server) to embed wherever they want on the page.

  37. January 18th, 2008 at 17:42 | #37

    I can not get any other user but user 1 to use the module.

  38. January 18th, 2008 at 17:45 | #38

    It seems like the function that checks if a user has full html right fails. It always returns true on user 1, but fails, on my site, with every other user, even if they have admin rights.

  39. January 31st, 2008 at 07:15 | #39

    nice one – was looking for a good image upload / insert module
    and this one is the closest I could find

    2 questions / issues however :

    - is it possible to disable the imagepicker for certain content types ?
    - can you collapse the imagepicker block ?

  40. February 25th, 2008 at 16:57 | #40

    Any chance of updating this to support Drupal 6? Or will it work out of the box? I’m pretty new to Drupal so I’m not sure.

  41. March 25th, 2008 at 07:40 | #41

    I also had problems with the background showing up in the content area. Spent ages trying to change the css.

    Eventually I came up with this workaround:

    In the imagepicker.tpl.php file I put a div around the content and styled it using an internal stylesheet. Works fine.

  42. Rob Stupay
    March 26th, 2008 at 14:17 | #42

    I’m having trouble getting Drupal to upload a file. I realize this is some drupal config problem but does this problem look familiar to you. I get this error in Durpal when I try to upload an image:

    Unable to create a directory structure for your images.



  43. Klavs Klavsen
    April 4th, 2008 at 05:03 | #43

    Unfortunately ImagePicker doesn’t work with tinymce :(

  44. April 7th, 2008 at 15:26 | #44

    Any plans to update this for Drupal 6?

  45. Anto
    May 16th, 2008 at 12:21 | #45

    As Mark Macdonald, I am waiting for the module to be ported into Drupal 6. I have been trying to do that in last 4 days, without good progress :( Maybe I need to take a formal training about PHP scripting. :D

  46. Paul
    May 17th, 2008 at 04:12 | #46

    Unfortunately NOT compatible with 6.2 version. Is ther any way to fix this???

  47. zmove
    June 16th, 2008 at 01:01 | #47


    Thank you for this great module, I tried it and I find it very good.

    I will wait for D6 to compare with imagefield when it will come out (if it come out one day ;) ). This module would be perfect with a possibility of mass image upload (without zipping before). A kind of integration with swfupload or other…

    Congratulation for the author for this excellent work !

  48. SHL
    June 18th, 2008 at 16:38 | #48

    It would be cool to be able to choose between inserting an HTML-tag, or an img_assist bracket-tag, since the latter one is much nicer to use if you are using wiki-syntax rather than a WYSIWYG editor.

  49. You
    July 30th, 2008 at 20:45 | #49

    Any plans to publish this module on the Drupal website as a project?

  50. tony
    July 31st, 2008 at 19:45 | #50

    @You I believe it already is.

Comment pages
1 2 192