New Drupal Imaging Module

The latest module i've concocted for the next release of Drupal is designed to make adding images to content easy without getting too caught up in HTML. It acts as a frontend to image.module, and thus does not upload images by itself. Here are the screenshots.

So what makes this different from all the other image-adding modules? I have no idea, i didn't look. But here's a list of things this one does:

Quickly add images

Step 1. Choose a thumbnail
Step 2. Click 'Insert image snippet'

Add borders, captions, adjust alignment and more...

With no need for any third party libraries.

Resizing maintains aspect ratio

When resizing an image, the dimensions of the image are locked by default in order to maintain the aspect ratio.

You control the output

The HTML code snippet generated by this module is user-defined. For example you can make all your images float to the right by default, or even link to the larger image.

Track where images are used

This module records to locations of all the links it generates. This allows you to generate blocks that inform your users where else this image appears. You can do this by enabling the 'Image reference' block. The block will be visible on the node/view/ page of any image with references.

Creates pure HTML with no Drupal filters

Previously in order to add an in-line image to a node you either had to use an image filter or straight HTML. This module creates the best of both worlds. The end result is HTML that does not need to go through the Drupal's sometimes expensive filtering system. And better yet, if you ever update your original image with a new one, the image links will still work. This is because the generated code snippet is using a reference to the image ID instead of the actual file.

Image Preview

You can view what the image will look like before changes are committed.


Only an interface

This module does not upload images, it only inserts images that are already on the server into content such as blogs and stories or any node type. This makes it a great interface for the image module.

So, in order to use this module, either you need the aforementioned image module installed or you need another module that does the following:

  1. Stores images as nodes
  2. Creates a database table called 'image' with at least the following column names:
    • image_path: the path to the image from the Drupal root.
    • width: image width
    • height: image height
    • nid: the node id of the image. Images must be nodes.

And now the download link:

http://drupal.org/node/view/8750

This looks useful

This looks very useful, Matt. I'm looking forward to trying it and seeing it available for the next major release.

The drupal modules for image

The drupal modules for image resizing are really great and now you can add resizing of picture related with the window size. Thanks hostgator coupons

Drupal is the best platform

Drupal is the best platform for the webmaster as its modules are awesome with great functionality. gold parties

I think AJAX has the best

I think AJAX has the best functions for managing the websites even Drupal modules are very useful. THanks for sharing. Discount Sunglasses

works great

works great on my installation! thanks :)

An option for sorting the image list (by name or date), and perhaps a multipage navigation when choosing images will make it easier to use too.

yep

I think image thumbnail filtering based on taxonomies is a great idea. It's being worked on.

Wonderful!

The more pictures I get, the more the tool is rendered useless. filtering will ROCK!

in the works

I want to implement this using built-in Drupal functionality. However, one of the core functions needs a slight tweak in order to do this. I've filed a feature request, so we'll see.

Works on 4.4.x out of the box

Works on 4.4.x out of the box with no changes and no errors. Would be good to see the pasted-in HTML as a configurable template -- i.e. not all will want it wrapped in a div, etc.

This should definitely be brought into Drupal -- please do submit it as a contrib for now: I can finally ditch node_image!

Wow

With all the menu changes i wouldn't think it would be backwards compatible. Cool.

Per your suggestion, the code snippet generated by img_assist can now be altered.

still some problems, but promising, very promising.

I'm having some trouble getting it to work correctly (it's not pasting into the text box), but I suspect the trouble may lie betweeen keyboard and chair. You can see it on www.widgetopia.net...

overall the one request I have is for all boxes to be resizable. the previews are too small, and letting the user drag them a bit bigger would be nice.

Thanks for testing.

I just upload a new version of this module. It fixes several issues with Internet Explorer. Care to try again?

There is also a new option to add the thumbnail to the post instead of the original image. This comes in handy when the image is so large that resizing it causes too much distortion.

part solution?

I'vw got two different problems going on-- the one where the image won't be placed in teh post, and another which is that all three panes have "page not found" in it. I'm really puzzled what went wrong in the second scenario.

Another oddity is in the second scenario, a button for inline images shows up, which doens't happen with the one "working" install. This button doesn't actually do anything.

Feel free to ping me if you want some help debugging. YIM christina_wodtke

new version

I see you're using an older version of the module. Try grabbing the new one and see what that does. I last updated it on June 11th.

yeah, my ftp..

was acting oddly. it seems perfect now in widgetopia. my site where I'm getting the 404's (www.indieword.com, currently a playspace) is still broken, but i suppose that's something at my end. very weird-- i've removed everything, dropped the table, reinstalled and recreated the table and it's still spitting 404s in all three panes. sigh.

should be fixed now

It was a problem with clean_urls being disabled. I've uploaded a new version.

seems to have done the trick!

Thanks for bearing with me.... (and thanks for an awesome tool!)

pssst

it's dropping double vspaces rather than hspace and vspace.

got it

Thanks. I've fixed that bug.

I'm getting 404s in my log.

404 error: "modules/img_assist/preview.js" not found
404 error: "modules/img_assist/directory.js" not found

It looks like it is looking for javascript files instead of the .CSS files.

Everything seems to be working okay.

I've upgraded to CVS. :)

I assume it should work with that?

I'm using FireFox .9

- Mark

okay

Don't worry about those errors, they aren't causing any harm. I'll take care of them on the next release.

I think it's time this project moved to the Drupal contributions repository.

odd...

I get a 404 Page not Found error when I try to add an image to a node:
/img_assist/add

The settings dialog works fine:
/admin/system/modules/img_assist

I'm running drupal 4.4.1 with image.module installed and working.

fixed

It's working now. I had some CVS problems that caused the 4.4 backport to fail.

That was quick!

That was quick! It works fine now.

Some requests (do you want requests here or on drupal.org?)

  • Optional filtering on author

    Either by presenting a list of authors just like the list of taxonomies, or a 'my images only' toggle

  • Add 'Use original image' to the Image to use pane.

    Better yet, change the Image to use to three radio buttons:

    • Original image

    • Automatic thumbnail
    • Custom thumbnail
  • Default settings, settable in admin
  • Fix aspect ratio in thumbnail pane

feature requests

It would be better if feature requests were filed at drupal.org. But here's a quick response to your post:

Optional filtering on author
I'm not planning to implement more filtering options until a better, non-intrusive interface is developed for the filters. If I made an author filter, then it follows that other folks will want a filename filter, last modified filter, date created filter, etc. This system needs a clean interface that doesn't end up cluttering that pane.

Add 'Use original image' to the Image to use pane.
Unchecking the 'Use original thumbnail' will automatically use the original image instead. It makes sense to me to resize the original image, but I'm not convinced the same is true for a thumbnail. Thumbnail resizing is best left for the module interfacing with this system, in most cases image.module.

Default settings, settable in admin
What default settings are you referring to?

Fix aspect ratio in thumbnail pane
I agree.

me2

I also have this problem, both with the CVS version of the module and 4.4.0

Whats the problem?

I am using Drupal 4.4.1, does it only work with 4.4.0 ?

/ cybe

No snippet inserted (4.4.0) and 404 page (CVS)

I was not able to insert code snippet using Insert Snippet button ( i guess due to javascript errors) - tried it in firefox and IE - no go, button just does nothing. This problem was with the 4.4.0 version. So I downloaded the CVS version, disabled the old module, deleted old folder and inserted new folder then enabled CVS version - now I get 404 when I try to click Add Image link. It looks like this:

http://dev.daveswave.net/?q=img_assist/add

Can't reproduce

I cannot reproduce this problem. Please file a bug report with any other helpful details (drupal version, using clean urls?, steps to reproduce).

Personal Gallery

It would be cool if there were a "personal gallery" option in terms of images to choose from. This would make a useful default for gallery to display (though this is different from taxonomy, I know). I have a site with tons of images, and while I love the functionality, I don't love how long it takes to load all the thumbnails into the interface.

This issue has been resolved

This issue has been resolved in the CVS version using taxonomy filters.

Improved output

Hello Matt,

thanks for the module, it's really useful. Too bad it can't make into core :-s

Here are some idea for future versions:

* Use CSS instead of html attributes to align the elements (`align` is deprecated)
* Align the `div` not the `img`.

Drupal new image modules are

Drupal new image modules are great and you can easily create your own picture gallery. laser hair removal nyc

Options As Optional

If this makes any sense, I was curious if it would be possible to have the options displayed (ie: size, captions, etc) as optional. For example, one could configure the model to only allow certain features that may be applied to the image.

I have been configuring a site where inline images would be a benefit, but the test users found image_asst as "too confusing" since the majority just want to "add a picture" to their content. They found the options overwhelming.

Anyway, just an experience I have recently had.

Options As Optional

If this makes any sense, I was curious if it would be possible to have the options displayed (ie: size, captions, etc) as optional. For example, one could configure the model to only allow certain features that may be applied to the image.

I have been configuring a site where inline images would be a benefit, but the test users found image_asst as "too confusing" since the majority just want to "add a picture" to their content. They found the options overwhelming.

Anyway, just an experience I have recently had.

Flexinode and img_assist

Matt,

I really like your module as it helps me get around a problem in the flexinode function, but I have a problem. I have been able to insert images using img_assist in the generic story module. However, in the flexinode it will not insert the html code in any of the fields. Is it not compatible with flexinode? Is it looking for a field with a particular label? I can preview the image, copy the code, and paste it in the field I want, but I would like to reduce the number of steps if possible.

Thanks,
Maria (mariagwyn@hotmail.com)

The new module has been very

The new module has been very nicely described and its pretty useful in various projects where I can avoid the HTML. I have gone through the website link and it gives proper techniques on how to formulate it.

Imaging module is very much

Imaging module is very much needed to avoid the large amount of HTML code. If one is not having a good command over HTML codes then this module really solves the purpose. I either not able to upload images earlier but this is easy and error free.

Reply: Imaging Modules

These Drupal modules are really very good and I was looking for such modules. I am happy to find that it works well with any resolution. Thanks

Drupal

Drupal is really very useful platform for the webmaster and there is no security issue in it. Thanks for sharing.

Thank you. Nice post.

Thank you. Nice post.

Thank you for taking time to

Thank you for taking time to share this information, I have been considering using drupal for my future projects, hope it's as good as people say!

© 2007 Matt Westgate