As I proposed in my request to join the docs team, I have started to re-write and organize the notes from my initial research into image-handling in Drupal.

The top-level introduction node has replaced the one in which Keyz originally posted this - you'll see I've preserved a link to his off-site discussion page, not only to be polite but to remind myself to go back and integrate notes from there as appropriate later.

Since this topic is complex, rather than trying to start right into a module-to-module comparison, I've decided to start by outlining the many issues that should be considered in choosing a site's image-handling method(s). Some of these issues are also controversial, so perhaps in starting thus I will give others the opportunity to help correct any misconceptions or biases I may have before I get into module-specific comparisons; my goal is to be as objective and even-handed as possible.

Therefore, immediately below the top-level introduction node, there are just two child nodes, the parent of the "comparison topics matrix" and the parent of the module-specific description and comparisons themselves. The latter is simply a stub page for now, and I won't bother linking to others like it from here any further.

Feedback would be appreciated; please have a look at my first drafts for both the introduction node and the top node of the comparison topics tree, as these are the only ones with real content at this point. It is perhaps more important at this point for you to help me refine the section's structure. The other stub nodes are just placeholders to define the book heirarchy; I didn't go any deeper than necessary, so please also have a look at the sub-structures outlined in these two nodes.

I'd prefer discussing things here for now rather than via revisions to the book pages, so that if pages need to be moved or deleted we don't need to worry about losing or having to re-edit any content.

Thanks in advance for your help with this!

Comments

HansBKK’s picture

Title: New HB section - Overview of Image-handling and modules comparison » New HB: Image-handling overview and comparison
Assigned: Unassigned » HansBKK

As I get into some of the current image-handling limitations, I'll want to reference the fact that core's file-handling is being overhauled, presumably enabling better file management in general, but AFAIC particularly relevant to images, since that's usually the bulk of most sites' files.

It may seem like an odd place for it, but I've created a placeholder node about the new D7 File API developments within my image-handling section "wireframe". I don't understand these new developments myself, so I've also posted a request in the File API group for help in getting some users-POV information there.

Obviously there's a better place for this elsewhere, so once we actually have something, feedback welcome.

HansBKK’s picture

OK, I'll take silence as acquiescence, if not approval :)

I've fleshed out a first draft and created the the sub-levels of the Display models parent node, feedback please!

The sub-hierarchy under File upload/storage issues is waiting for your structural feedback in the parent node's content, other than the placeholder for core's file-handling limitations and the coming developments in D7's API as mentioned above - which I have edited after receiving some content feedback from the Files API group.

I'm starting to realize what a big task this is going to be if I'm going to do it as well as I'd like. Some of these areas are going to start out a bit sketchy, but I hope to at least not leave too many raw stubs in there past a week or so. . .

tebb’s picture

Hans, Thank you for your efforts on this.

I can't help a great deal as I have not used this area of Drupal much yet, but believe that a big *performance* issue relates to whether you have file access configured as private or public.

As I understand it (could be quite wrong) public files are referenced by direct links to the files, which can be served by the web server swiftly, whereas private ones have the word "system" in the path somewhere. The word "system" is picked up by either .htaccess or a Drupal 'handler' (?) causing Drupal to be 'bootstrapped' to check whether access is allowed. This is much more processing than just Apache (or if you are unfortunate ;) IIS, or ???) serving the file.

I did find an article once containing a method of running private *and* public files, which seems like a good idea for some site requirements, but I think this is unusual. From memory it used .htaccess files to add the word "system" in the relevant place for selected files, forcing them to be private.

Someone with a better understanding could probably clarify this, but it's a start to explaining a 'high level' performance option.

HansBKK’s picture

Thanks Dru-p.

I have in my research come across many modules having problems with Private, and since one shouldn't switch from one to the other, I've personally decided to just the global setting to Public, and then use module-based access control methods if/when I need to restrict access.

Therefore I'm afraid I don't have any experience with public vs private at all, much less any knowledge of related performance issues.

I doubt if I'll be getting into this in comparing image-handling modules, so far the only real performance-related issue is the minor one that if you have LOTS of images then the "image as nodes" paradigm MIGHT add some database overhead. Otherwise that node's just a placeholder for people such as yourself to post other information I haven't come across - feel free!

Thanks

tebb’s picture

Hi Hans,

I think that public/private is the point. AFAIK, you cannot control access to the files with Drupal unless you select 'private'. If public, Drupal does not restrict access to the files at all.

For handbook content, rather than potentially confuse people, I would be happier if someone who knows definitively how this works would cut/paste and edit my text into the performance section.

I'm working hard on Drupal, but have only been doing so for a few months and attention has been split over many areas, so I currently feel I'm a 'Jack of all trades' that can get things done 'somehow' rather than an authoritative technical document writer :) ... but I will chip in where I can.

D

HansBKK’s picture

> I think that public/private is the point. AFAIK, you cannot control access to the files with Drupal unless you select 'private'. If public, Drupal does not restrict access to the files at all.

The point of what? The purpose of my work here is to give newbies an overview of how to include images in their site's content, with general comparisons between the main methods. Both performance issues and file access restrictions are IMO pretty tangential to that topic, even if you find they are related to each other.

For those that are interested in the more general issue of public vs private, my understanding is that many contrib modules break, or at least have complex issues, if you set your method for core Drupal to "private". I believe there are also problems with anonymous visitors accessing "public" content.

I personally don't have any need for file-based security and in fact my sites currently have no login other than admin, so the issue's a bit of a no-brainer AFAIC - go with Public. You (Dru-p) have now mentioned something I wasn't aware of before - the performance problem, which just reinforces my decision.

However, for those who might be interested in controlling access to files, I believe even if you are using "public", you can still associate files with nodes and then use one of the many access control schemes like Simple Access, OG or TAC (probably the way to go for Taxonomy-based galleries?) I believe Acidfree's use of Filemanager + Attachment takes this route. Other modules have their own enforcement scheme without depending on node access methods: check out Asset, WebFM to start with. Of course, you need to have Apache's config set up properly (.htaccess), don't allow direct directory browsing etc. but that's got nothing to do with Drupal.

If you truly need to use Private, then maybe use multi-site, leave your main public access site set to Private and set a sub-site hosting restricted content to private? Just thinking out loud. . .

As I said, I myself don't know that much about it, and so far I haven't had any need for this, but I'd love some pointers to documentation to help me find out more about this topic for when I'm working on sites that need this.

If there isn't one, maybe you should start a Handbook section explaining the issues?

tebb’s picture

Hi Hans,

OK, perhaps it wasn't clear. I meant: 'My point' is specifically about private/public file system setting when used with images, and how that impacts perceived performance (more specifically, page load times).

As I emphasised in my first comment, I was suggesting some content that could go into the *performance* section that you have created as a stub in the handbook. That was because I have researched this aspect.

I do not have experience in the more general area of using images in Drupal, so I only tried to help in *the performance area* - That's all.

I thought you wanted contributions in this thread that could be added to the handbook, rather than comments on the pages, so that's what I tried to do.

If as you say "performance issues and file access restrictions are IMO pretty tangential to that topic", I'm not quite sure what the performance section is for, so feel free to ignore my attempt to contribute.

Also, I didn't take in that this was exclusively for newbies. "The purpose of my work here is to give newbies an overview ... ". I thought it was going to be more generally useful as a comparison of methods and modules.

Thinking about it ... I'm not sure if the handbook in general is meant exclusively for newbies or for use as a reference. I'll take another look. I'm still on the Drupal learning curve myself.

Your multi-site/sub-site suggestion is interesting and could be very useful. Thank you for thinking out loud.

Cheers, Dru-p

HansBKK’s picture

@Drup-p

Thanks, and OK, I've added the small and pretty vague statement referencing the issue.

http://drupal.org/node/325294

Feel free to comment or even edit, ideally pointing to authoritative information if you find it.

aaron’s picture

This is some great documentation! Thanks for starting this project. One note I would suggest would be to write in the third person rather than first person. Also, some of the warnings ("Don't edit here, post to issue first") are intimidating. Might be better to simply ask for editors to note their changes in the issue. The point of revisions is that we have a history of things, and I suggest we keep to the spirit of wiki documentation here.

HansBKK’s picture

Thanks for the feedback Aaron.

Yes I've been trying to follow the styleguide, but I know I sometimes slip into "forum style", especially when I don't feel authoritative on an issue.

Could you please clarify this?

> ask for editors to note their changes in the issue

What I've been intending is to ask people to give ideas here in the doc queue issue about structural comments, and for those nodes that are basically stubs, so I can build up the cross-references as I go along.

Once I've completed a first draft nothing like that should remain, and the usual practices - direct editing or posting comments - should apply.

Hetta’s picture

OK, one often-overlooked helper module for http://drupal.org/project/image is http://drupal.org/project/image_filter .

It's a nice alternative to image's included image_attach module:
1) it doesn't need its own table
2) you can add any size image (within reason) to your nodes
3) you can add any number of images to your nodes

Drawbacks:
-1) you need to know the node number of any given image, which means that only admins can use it. If that's OK, then it beats image_attach hands-down.

(Also, it's http://drupal.org/project/img_assist , not image_assist ...)

HansBKK’s picture

@Hetta - thanks, I've had a quick look at Image filter. It doesn't look like it adds any functionality beyond what Image Assist offers; please correct me if I'm wrong. Also, it doesn't seem to be actively maintained these days, e.g. no D6 version even in dev.

>Also, it's http://drupal.org/project/img_assist , not image_assist ...

Could you please let me know if/where I put in the incorrect link, I couldn't find it?

Thanks

Hetta’s picture

img_assist: I tried it out a year or so ago, when I decided on my site setup, but it didn't fit my needs - ah yes, it requires too many other modules (token, views, etc.), and my site is under heavy enough pressure as is (it eats 20-25 % of shared server CPU ...). If drupal's cache modules get better that's no longer a problem, but as is, it's a no-go.

image_filter lets you reuse existing image nodes, provided you know the node number.

image_attach lets you reuse existing image nodes, and lets you search by image name, but only lets you add one image per book/blog/whatnot node. There's a few attempts to address this in the image queue, but nothing that'd get included in the official version.

Sorry, I think you called it image_assist somewhere or other (where you compared it with image_attach), but you didn't give a link in that post.

HansBKK’s picture

Yes, image re-use is a key advantage of the Image family.

I'll make a note of the lower resource needs of Image filter, but also the caveat that it's not being maintained much anymore.

heather’s picture

Concerning http://drupal.org/node/316884

I think this page is in need of a re-write. But I'm wary of making changes directly, as they would be quite extensive. So I'm putting my suggestion here.

Quote from the page:

There are hundreds of threads on drupal.org illustrating the complexity and confusion the new Drupal user experiences in trying to make an informed decision on what image-handling modules to choose to fit the needs of a given site. 1 2 3 4 5 6 7 8 9 10 11 12

I think your first sentence here is stating the obvious for users- and possibly making the task more daunting, where you want to be giving them guidance and making the task less daunting. I can't tell what a list of 12 links offers as help to a user. The numbers are arbitrary, and the reader is lead to wonder... what is that link? Mystery links aren't attractive in this context. Perhaps if you want to list to the forum topics, then include their titles? Even then, they have come to the handbook, and possibly sifted through alot of back-and-forth on forums. I would remove the list of links.

The best page you link to is an external page, but the link, again, is a mystery link. Change:
" Here is an external page created to encourage discussion of this topic." to:
To find out more, read David Newkerk's "Roundup of image modules for Drupal" retrieved: 30 August 08

In the third sentence you seem to be criticizing Drupal core (that" there is very little to even support various contributed modules, other than basic file handling routines")... so I'm not sure what this offers to the new user who is looking for guidance on how to handle images in Drupal. For the new user it is a distraction and non-essential information to the task. It is also a negative tone and might be demoralizing.

This page (and section) should answer the following questions:

  • How could I handle images in Drupal?
  • What options are available to me?
  • What are the considerations so I can make the best decision?
HansBKK’s picture

Yes I'd made Diigo notes to self to take off the negative spin stuff from there.

No time at the moment but trust you to do what's right if you have time, otherwise I'll try to get back to that project over the weekend.

ball.in.th’s picture

Regarding the security of input filter for WYWIWYG rich text editors at http://drupal.org/node/325296, perhaps HTML Purifier should be used instead of "Full HTML" or "Filtered HTML" with img element added.

jaskho’s picture

@Hans: SO happy to have found your work here! What a hugely valuable and important contribution you're making!

Some feedback from the perspective of someone solidly in your target audience (I'm very much needing to get my head around the various options, approaches and issues):

(1.) Image Reusability
This page seemed like it might need some work. (Or, of course, I was missing the point).

Nearly all the various image-handling modules allow you to display a given image in multiple nodes by treating an image as an asset.

Other image handling modules allow you to upload images into a node, but these images are only linked from the node itself. To get this image to display in another node, you'd either have to re-upload that image, or identifty the location of the image, and paste in the link as an img src tag using standard HTML <img /> tags.

Inline and Imagefield are two contributed modules which work in this way.

This was confusing to me. The "Nearly all [modules]..." then "Other [modules]..." phrasing threw me off. Are you saying that "nearly all" image-handling modules provide natively for 1-to-many relationships between images and nodes, while "other" (i.e., "some") do not (though that limitation can be worked around)?

I would suggest something along the lines of

Nearly all the various image-handling modules allow you to display a given image in multiple nodes by treating an image as an asset. However, some image-handling modules, such as Inline and Imagefield, do not.

Also, the material seems to sort of slide right from the general discussion into a consideration of work-arounds for Imagefield, which was confusing to me - are we talking about Image Reusablity per se, about the distinction between modules that do and do not provide for reusability, or Imagefield?

(But then, this leaves me wondering, what is the purpose of this page? Isn't this covered in file-to-node relationships? Perhaps I'm missing something??)

(2.) Ease of use
I think the comparison (first paragraph) between insertion processes that on the one hand are "transparent to the user" and, on the other hand, those that require "hand-typing macro tags with cryptic syntax" comes off as a criticism of the latter. I know your intention here is to stay value-neutral, so maybe some other phrasing would be a better fit. Maybe, "some modules strive for high ease of use with a point-and-click-style interface, while others require a certain amount of technical know-how."

Anyway... Again, many kudos and thanks! I can imagine how hard this task must be!

Encarte’s picture

subscribing

bryan kennedy’s picture

Hans, it's fantastic to see these efforts to describe the current image/media handling hullabaloo in Drupal. I am going to spend some time editing and adding to the pages you've posted already (in the spirit of the handbook authoring guidelines). I'll post back here with notification of my major edits and see if there are improvements we can continue to make.

mcurry’s picture

img_assist: I tried it out a year or so ago, when I decided on my site setup, but it didn't fit my needs - ah yes, it requires too many other modules (token, views, etc.), and my site is under heavy enough pressure as is (it eats 20-25 % of shared server CPU ...). If drupal's cache modules get better that's no longer a problem, but as is, it's a no-go.

Minor clarification: AFAIK img_assist module is dependent only on the image module. Not sure why you think it needs token & views support. It never has, to my knowledge.

leehunter’s picture

Status: Active » Fixed

This seems more or less done. Definitely hasn't been worked on in a while so I'm going to mark as fixed.

arianek’s picture

Assigned: HansBKK » Unassigned
Status: Fixed » Active
Issue tags: +d7docs

FYI - new stub pages have been created in the handbook for field and field UI (now used for image field) http://drupal.org/handbook/modules/field and http://drupal.org/handbook/modules/field-ui, as well as file http://drupal.org/handbook/modules/file

this will probably need to be reflected in the above docs.

(unassigning from hans, since he hasn't commented in over a year on here)

heather’s picture

Hello Arianek,

I see the new stub pages for the file field & associated UI, but this doesn't answer the overall questions about "Image handling best practices" which alot of people have questions about.

Since these pages were drafted in '08 things have moved on quite a bit in the world of image handling(!)

I recently started writing up a document advising about Image handling best practices... and I'd like to post it on D.O for reference and also community input... But all the pages associated with this best practice topic point to this withering thread.
The pages: http://drupal.org/node/316884

Could we scrap the bulk of the structure in the first attempt? It seems to have many many stub pages. I'm in favour of starting small and growing organically, on an as-needed basis.

I recommended a user-goal focused approach, with only 3 sections.

How could I handle images in Drupal? (explain at a high level the different approaches)
What options are available to me? (listing modules, clustered with associated modules which extend functionality)
What are the considerations so I can make the best decision? (Q + A, what to consider for you own situation, and point to which solution is best)

I'll hang out in IRC over the next week and see if I can jump in and get this off the ground

on IRC my ID is "nearlythere"!

leehunter’s picture

I wanted to note that we have two image handling sections in different places with an unfortunate amount of overlap. There's the comparison of image handling modules section (http://drupal.org/node/316884) which has been the focus of this thread and then there's this section which on working with media and files (http://drupal.org/node/627244).

The user-goal focused approach you mention is really desperately needed but it should probably go in the section on working with media and files (http://drupal.org/node/627244).

I actually think that the various module comparisons should be moved to the relevant areas - eg the image handling module comparison should be added to the bottom of the image handling section of the documentation as a reference - but I got some flak when I tried doing this before.

Right now there's nearly enough content just on image and media handling for a small book but there's also, as I mentioned, quite a lot of duplication and a really bewildering number of modules.

arianek’s picture

Lee's been working on sorting out the structure and organization for the handbook, so I'll give my vote of support on his input.

But yes, the functionality for images in D7 has changed a lot, so that should definitely be incorporated and appropriately linked to (or even partly written in the field module handbook page in particular).

heather’s picture

Heya Lee & Arianek,

To make a vital improvement then, I propose:

1) You (someone with rights) could archive those "stub" page then?

It's not only misleading, but looks poorly on the community- is it's a job undone.

2) I say we remove references to this thread, close it. This thread was only relating to that other approach, and I think it's been discussed and abandoned at this stage.

3) Redirect those stub pages to

http://drupal.org/node/627244 - Media & Files or,
http://drupal.org/node/627244 - Image handling

I have had clients locate those stub pages and they seem to bump up in SERPs and Drupal's on site search.

Is that change agreeable to you both?

I then say we pick up the discussion in a new thread: new-user overview of image handling approaches in Drupal 6 and 7.

Here is the thread: #702238: High level overview of image handling options for new users of d6 and d7

Can we redirect those stub pages and close this puppy?

- Heather

heather’s picture

Just an update...

I am abandoning the idea of putting these pages in the Media section, so you can ignore all of my comments and suggestions above!

I had thought I was suggesting a sufficiently different direction than this thread (as well as trying to close this thread). Arianek suggested closing the other thread, so I marked it duplicate.

So... I'm going to develop this content off site, and later, if needed/wanted it could be integrated.

Thanks all for the feedback,

- Heather

arianek’s picture

Category: support » feature

ok, well let's definitely leave this open, someone else may take it on - if someone does, please also see the notes on #702238: High level overview of image handling options for new users of d6 and d7

arianek’s picture

Component: New documentation » Correction/Clarification
Status: Active » Fixed

Those pages have since been fleshed out into proper docs pages. Closing this.

Status: Fixed » Closed (fixed)
Issue tags: -d7docs

Automatically closed -- issue fixed for 2 weeks with no activity.