Hi all,
I wonder if a few folk could take the time to look through this rather long post (sorry!) and give me their thoughts of current and future best practices for wysiwyg image use.
in short
What's the best way, now and for the future, to insert images which are nodes into an article with a wysiwyg editor, allowing both browsing and uploading within the editor? Ideally the image browser is a view, the image content type is my homemade beast, the upload form is just a node creation form, and video (well ideally any asset) could be inserted in the same way. I'd also like to be able to pull any necessary data (eg copyright) from the image node.
background
I created a newspaper site where every story had a picture, but always following a standard format/positioning, so there was no need for inline pictures. I needed to give each picture info such as caption, photographer and copyright, and I needed to use i18n: I chose to have an image as a node, and use CCK fields for metadata rather than ImageField Extended so I could run queries on them. I used imagefield, imagecache, nodereference, nodereference explorer, and a template for the nodereference - it was wonderful!
current situation
On a different site I now need to allow inline insertion of pictures, and for the same reasons as before I think I need to have an image as a node. I'd basically love all of the convenience of my old method, but with an inline image, plus the ability to create the image node within the editor. I've spent a bit of time looking into this (phew) and I've outlined what I see as the options below. I'd love to hear which of these options people currently use, and which folk consider are future-proof. Also, of course, if I've missed out The Easy Way, please let me know:)
image, img_assist, wysiwyg + TinyMCE
pros
- Allows wysiwyg insertion of inline images based on the nid, not a direct link.
- Allows upload and creation of images within the editor.
cons
- Image is at beta, img_assist's at alpha, and in fact if you look here it says the alpha for img_assist's abandoned and implies you should use the dev.
- It's a very specific solution - it only works with images, in fact only with the module-defined image content type. I'd prefer something a bit more generic, but that's not the be-all and end-all.
- If you have translated images, then one image for each translation shows up in the browser.
- Not sure how easy it is to find particular images within a large library.
- If I add a CCK field, eg. photographer, to the Image content type I'm not sure how easy it will be to have it display. Can I just theme it in?
linodef, linodef_taglists, linodef_wysiwyg, wysiwyg
pros
- It's rc5 (well, it's a pro compared to the others!).
- It uses the nid instead of direct links.
- Can be used to insert imagefields inline.
- Might be quite easy to use/adapt for use with assets in general (video, audio, etc.)?
cons
- It doesn't display as wysiwyg.
- I couldn't find a way to integrate it with imagecache, though I'm sure something could be done (add new tags to linodef; play with theming or templating if only simple use of imagecache).
- I couldn't get it to show the taglists as anything other than text lists: not a great way to browse.
- I don't think there's an easy way to allow you to upload and create a new node.
inline
pros
- Works with imagecache.
- Is at version 1.0.
cons
- Only works with files attached to the current node (didn't realise that when I started evaluating:).
- Only allows one imagecache preset for all images.
- Not wysiwyg.
imagefield, imagefield_assist, imagecache
pros
- Allows wysiwyg inline insertion of images.
- Allows upload and creation of nodes (I don't know how much massaging it would take, if any, to create any custom content type, but I presume not too much).
- Avoids direct links.
- imagefield's at v3.2.
- Is a generic solution that feels nice to me:)
- update: can use views for the browser with this patch which worked for me against beta3. The issue's at http://drupal.org/node/613968.
cons
- imagefield_assist and imagecache are both betas (tho it seems every drupaller and their dog uses imagecache).
- If you have translated nodes with imagefields then a) the browser displays the same picture once for each translation, and b) choosing any picture causes a lookup based on fid with no regard for either current language or which picture you clicked on.
- Not sure how easy it will be to hook into the node to get info like author's name. Maybe it'd be better to use ImageField Extended for such data.
- When editing previously added images, I can't go straight to the image edit form - I have to delete and insert again.
- Although it reads and displays the alt text from the imagefield, it doesn't automatically use it.
imagebrowser(v1), image, imagecache, fckeditor
pros
- Doesn't use direct links.
- Image shows up inline as wysiwyg.
- Plays nicely with imagecache.
- Uses a view for browser, nice and flexible.
- rc1 status.
cons
- Uses custom urls such as /imagebrowser/view/image/20/_original, which makes grabbing metadata a bit difficult - but 20 is the nid, so definitely possible.
- Needs fckeditor.module.
- Can't be used with custom image content types.
- No built-in way to get the translation of specified nid (AFAICT).
- The default is to accept an url (minor).
imagebrowser(v2), wysiwyg, imagecache, views
pros
- Uses a view as a browser, so advanced browsing's ok.
- Works with wysiwyg.module.
- Nice simple ui.
- Allows simple adding of css styles.
cons
- Still only at dev.
- Works with a fid, not a nid - possible issues with i18n and metadata.
insert, wysiwyg, imagefield, imageacache
(Couldn't get it to work with wysiwyg, so dunno about the browser - if it has one.)
pros
- Should work with wysiwyg, and plays nicely with imagecache.
cons
- Uses direct links (or imagecache links) - makes i18n more difficult, as well as problems when files move.
- Still at beta.
media, styles, wysiwyg + CKEditor
(I couldn't get anything really working on 6.x, but had a brief play on 7.x-dev.)
pros
- Allows upload to and selection from library.
- Also allows urls.
- I'm guessing it's this beautiful API so maybe loadsa modules will be able to plug into it.
- Apparently it allows you to add fields (eg. photographer) to a piece of media.
- It's massively generic (AFAICT) which is cool!
con: it's not ready!
questions
- Is this the True Path? :)
- Will it be easy to translate fields?
- Is the image browser based on a view or otherwise customisable?
- I wonder if anyone would (very) tentatively say when they think the complete set of functionality I'm looking for might be available in for 6.x. A 'not before' would be great!
new: ProsePoint modules: pp_ed, pp_img, imagecache, imagefield
pros
- On clicking the editor image button, you get a simple choice: upload new image, use existing, enter URL.
- The browser is a view.
- Integrates with imagecache.
- Puts the caption under the image in nice wysiwyg fashion.
- Uses nid in the tag.
- As the caption is stored as part of the tag, it plays nicely with i18n.
- Best wysiwyg inline node as image method for D6 I've seen IMHO.
cons
- Modules aren't released separately from PP.
- Modules are rather hard-coded for specific usecase of PP; you must use TinyMCE, you can't change button options through a web interface, etc.
- Uses custom ifimage content type for images. Inspection reveals it's just a normal node with the body changed from a textarea to a textfield (to act as the caption field), and with an imagefield.
- The caption attached to the node (ie the re-purposed body field) isn't used as the caption when inserting. Presumably the idea is that the general caption you see when viewing in a gallery is different from that you use in a specific article. Still, it would be nice at least to use it as a default.
new: nodereference_explorer, insert, wysiwyg
There's a patch being developed for insert that will let you insert a nodereference in a wysiwyg fashion. This would be fantastic for images, and pretty much anything else for that matter, especially if combined with nodereference_explorer. Thanks, segments, for pointing this one out.
new 3 Sep 2010: wysiwyg_imageupload
pros
- Very sleek looking interface!
- Works all nice and wysiwygey.
- Allows you to choose from a user-defined subset of imagecache presets.
- Allows you to choose user-defined styles.
- Allows simple placement of the image from within the popup.
cons
- It doesn't support images as nodes.
- It requires the use of jquery_update, which is currently alpha.
- I had some warnings about versions being out of date, but I think that's probably a very minor typo in a .info somewhere.
new 3 Sep 2010: nrembrowser
pros
- Can be used with both wysiwyg insertion and choice of nodereference.
- Has finegrained control over which nodes to allow and what to use as the thumbnail.
- Works with imagecache presets.
- Can use exposed views to help users navigate large content sets.
- Can be used to insert other things than images (ie you can install this one solution and use it in quite a few different ways).
- Works with Styles to allow D6 to behave in a similar way to D7 + Media (the future is now!).
cons
- Although it's beta12, I had a hell of a time getting it to work at all. It doesn't help that it uses jquery_ui and jquery_update, but doesn't mention which versions are required. Even so it seems the CSS file for the browser doesn't exist in any of the jQuery UI packages (there's an issue for this). After too much experimentation I found it worked for me (FF 3.6) with jquery_update 2.0-alpha1 and jQuery UI 1.7.4 (and check out http://drupal.org/node/883924 for the path problems - you can either rename the CSS file, or edit the module file). At this point I had a nice looking browser, that showed my image nodes, and allowed me to select and insert them. Unfortunately they showed up as inline code rather than a thumbnail. If I disabled and re-enabled rich-text using the wysiwyg button the image showed up correctly.
- There doesn't seem to be any way to insert captions, though I think in conjunction with styles you could have a field from the node automatically displayed as the caption.
Thanks to Scott J for pointing this out, it actually looks like the way forwards, and isn't *that* far from being ready, but I still wouldn't want to put it on a live site.
conclusion
I loved the elegance of my old nodereference solution. Using a custom view with nodereference_explorer was divine. Creating exactly the content type I needed was supremely versatile. Using the templating system with the nodereference to show the caption and photographer was beautifully simple. The change to inline has suddenly muddied the waters for me - none of the options as I understand them fill me with joy. I'd love to hear people's comments. As I mentioned at the beginning, I'm interested both in what's considered a live-ready solution now, what's considered 'the path of the future', and of course any comments on things I've missed or got wrong.
Thanks in advance, sorry for the length,
Andy
Comments
Hats off...
Hats off to you Andy as this a very valuable discussion that you've already contributed to greatly with your research and summary. I'm simply subscribing in the hopes that the discussion continues and I might gain some additional insight.
We use SlideShowPro
We just upload all our media assets to SideShowPro Director and then bring them back into pages via a CCK text field in the content type that holds the xml file path to the SSP Album on Director. We added the embed code for the SSP SWF player (with a little PHP that picks up the XML path from CCK dynamically) into our node.tpl for the specific content types that use media assets and viola. SSP is a commercial product but is very low cost. You can google for more info. (I am not affiliated in any way with them). When we were designing our site we also went through all these various image module gyrations as detailed here and decided to settle on something that is more robust and sets along side Drupal. If Drupal ever gets a better integrated media asset system we will be happy to switch to it.
We have been serving around 70GB of media assets a month to around 12,000 unique visitors with this set-up on a shared hosting account. Some of our story nodes have had over 120 1920x1200 images in the slide shows attached to them using this setup. So far so good.
BTW: We LOVE Drupal for the rest of our CMS needs. We just found it not to be a great fit for our media asset management and presentation needs.
Hope this helps someone!
BTTW: GREAT writeup ANDY!!! Where were you when I had to figure all that stuff out on my own? LOL
Take Care
Perhaps of interest...
Andy, perhaps of interest, a thread of someone else asking the same questions:
Image management - the never ending problem!
http://groups.drupal.org/node/43682
Of interest to me as well
I'm interested in following this discussion as well; this is very much along the lines of what I've been thinking about in the redesign of the newspaper website I'm working on. I want to have each photo uploaded by our photographers as its own node ... but we also need to be able to display images in our stories (and each story is a node). I hadn't yet gotten to the stage of hashing out the best way for us to do this ... now I have a better idea of how to look at potential solutions! Thanks!
Katrina
Site builder, writer, trainer, graphic designer
Thanks
Thanks for the comments.
@dano
I hadn't looked into SSP, thanks. I think I understand how you integrate it, but can I just check:
Is that right? How are you finding it? Can you add arbitrary metadata to the pics? I get the impression your slideshows are very important for your site (120 1920x1200 images - wow!): do you think you'd have chosen this solution if you had, for example, just one small slideshow that's updated once a week?
@DeeZone
Thanks for the link. There were two solutions I was unaware of: cmis_alfresco working with http://www.alfresco.com/, and Studio Multimedia France's offerings at http://drupal.org/node/665756 (I read the original writeup, but I don't follow drupal.org too closely and missed this announcement). It will take me a bit of time to check those two out. Back to the discussion, it seems that the only mention of a wysiwyg solution that was actually used was img_assist. And it wasn't glowingly recommended! By the end of the discussion edde42 concluded
I haven't looked into D7 files at all. I'm being a bit lazy here, but I'll ask... does anyone know
Once again thanks for any help.
Andy
SSP Director is a web based
SSP Director is a web based media asset management service. You can buy it and run it on your own server or pay a monthly fee for them to host it for you. You can upload multiple video, images, and audio files in one big batch. Once on the server they can be organized and managed in many ways. It has a built in taxonomy system as well as the ability to populate fields automatically out of an images meta data.
We publish sports stories for a small community. Each story has a slide show block in the top right of the content section with the text of the story wrapping on left of the slide show. The slide shows are SWFs and include full screen capability.
We have opted to do any custom HTML editing of the story text using a local HTML editor and then just paste the code into the body text box. I really didn't like any of the available built in WYSiWIGs in Drupal.
No the images do not exist in Drupal. Everything to do with images, video, and audio has to be handled through the Director server. So far this has not been an issue for our work-flow though. Photogs can bulk upload assets into a slide show on director and tag it with a story ID. They can then email the XML file path to the writers who include that link in the CCK field when they make their story post which links the two together.
If we had just one small relatively static slideshow we would have likely picked one of the Drupal options detailed here for the job.
Interesting
I had a look at SSP, and it does look interesting. So do you use the cck/link to associate the content? Are you hosting SSP yourself or using their hosting?
Mark
Yes, our content type that
Yes, our content type that uses slide shows has a simple CCK text field added in to hold the XML path that Director gives you to identify a given album (slide show). The node.tpl file in our theme picks up the value of that field and passes it to the SSP SWF as a parameter. One single SWF file then handles ALL the slide show content for all the stories on the entire site.
Yes we do host our own director site. We are on an unlimited bandwidth shared host account and have had no trouble with anything as yet.
The reusability is important,
The reusability is important, and you must think about that before choosing a solution. If you want to reuse your stock images, so image-as-node is good. I don't know all modules that you listed, but imagefield (or just filefield) is fairly suit.
If the images are used just once, then I think imce (or any image browser, like CKFinder) + CKEditor is good. If you want to take your old CCK fields, but don't use image-as-node, the imceimage module may (hopefully, with the new maintainer) help you.
About i18n, I really don't have any idea.
this is awesome
I was struggling with making some beginner's documentation to show some common "recipes" for image management; with all the associated pros and cons.
You've just bumped me along about 75% to the way finished. Some solutions I have never even tried yet.
This is awesome.
Another work-around is possible with custom CCK compound fields. Not sure if it suits your own situation, but might work in others where there needs to be a direct relationship with text and image.
Imagine for example, you are doing a how-to site, and you need inline images to illustrate each step, a compound field for a "Step" with an image and a text field could handle this.
This is an example implementation from CutoutandKeep.com
Thanks Heather, I hadn't
Thanks Heather,
I hadn't considered that: so basically you're splitting a page into n identical chunks. I like how that lets me go back to using a nodereference, nodereference_explorer and a template (and should play nicely with i18n). On the downside (for my use) it's not flexible for layout, and might be a bit counter-intuitive for users who are writing what is conceptually a single piece of prose, such as a news article, but which is illustrated by a number of pics. Actually I guess in that case it would also make editing a bit of a pita.
Food for thought, thanks.
Btw, would be v. interested in seeing (helping with?) the image management recipes. Where were you thinking of doing it?
Andy
PS love the use of compound fields for illustrated steps - very intuitive and effective!
Alfresco and Studio Multimedia France24/RFI's newspaper modules
So I've taken a look at alfresco and Studio Multimedia France24/RFI's newspaper module set.
Alfresco
Alfresco's an open source CMS (or ECM, or whatever!) that has a community and enterprise edition, a bit like MySQL, and from it's own blurb does the following:
It can interoperate with Drupal through CMIS using cmis_alfresco. Seems to be v good for asset management, but its services are basically orthogonal to my issue of wysiwyg inline images. Looks good tho, if you need powerful asset management - wonder how it'll compare to D7 in this regard.
Studio Multimedia France24/RFI's newspaper module set
OMG what an amazing set of modules!! Nothing there to help with inline wysiwyg images :( It would've been great for images on my old site tho... especially Uberimage and Nodeselect. Highly recommend folk check out all those modules - amazing stuff.
So... still looking... :)
imce
We've used tinymce + imce for years. In general, though, we discourage the insertion of img tags into the body of a node, and use CCK fields and template logic instead.
Imagecache is going into core (under a different name) for D7. It's one of the half-dozen modules we really can't live without.
Here is a link http://twitpic.com/132xh5 to our editorial node photo section. There are multiple options. The main photo section can contain multiple items, which will be shown in an embedded slideshow and will pop up a Lightbox2 layer. Superphoto shows up at the top of the article page in large-format presentation. Lead photo, if present, is used by any Views that might request an image (for section fronts, etc); otherwise the first listed regular photo is used. Thumbnail is a similar option for contexts that demand a square image. All placement is governed by presentation layer logic.
Thanks for the input. I'm
Thanks for the input. I'm with you about discouraging inline img tags. My previous site was CCK field (nodereference, not imagefield) and template logic, as you say. This was easy and elegant to implement, and allows the site to have a relatively dramatic redesign painlessly. Unfortunately my current site needs the author to be able to put images inline. My ideal would be to insert a nodereference tag that would be filtered into the appropriate HTML. InsertNode looks perfect, though I haven't tried it, except that you can't get a wysiwyg view of the inserted node.
Btw, your photo system looks great!
Andy
Thanks for summing - quick related question
This is a great recipe starter. We really need some leadership with all these competing approaches. I'm also struggling with how to quickly copy an image URL into the file library. The image management modules all seem to expect upload from the desktop and not a URL. Any suggestions on a module / recipie?
thanks,
S.
I'm also struggling with how
What exactly are you trying to do?
Filefield Sources?
Maybe Filefield sources is what you are looking for? It can allow you to attach images to an imagefield, that are located on a remote server by just pasting the url to the remote image into the imagefield widget.
--
Tom
www.systemseed.com - drupal development. drupal training. drupal support.
Update
Hi, here's a quick update.
Subscribing
I'm the creator of ProsePoint. Unfortunately, I'm away on holidays at the moment, but hope to revisit this with my thoughts when I'm back at base. Thank you.
--
ThinkLeft - http://thinkleft.com.au/services/drupal
ProsePoint - http://www.prosepoint.org
ProsePoint looks great,
ProsePoint looks great, kudos!
I want to know what tools/modules are used in ProsePoint. What WYSIWYG editor are you using? Are you aware the image resize feature doesn't actually do anything? I'm really impressed, don't get me wrong, I just wanted to point out a small annoyance.
Visit my under-construction site. Let me know what you think. Thanks.
It uses TinyMCE, tho not
It uses TinyMCE, tho not integrated with wysiwyg.module or tinymce.module.
I can insert images of different sizes (imagecache presets) perfectly on my install...
Would love to hear from you
Would love to hear from you Beng.
Subscribing
Thanks Andy to keep your thoughts and progress open to we all.
I arrive today to the same requirement so you saved my day.
pleasure:) I'm currently
pleasure:)
I'm currently working on a few changes to the PP modules to fit them to my situation a bit more: will be happy to share when done. Looking forward to the future arriving with a nice clean oob solution.
Thanks Andy. I will start
Thanks Andy.
I will start with "linodef" as far as "taglist+views" combination looks like the most flexible one... I will post here any advances (if any :-D).
Please Andy, follow posting your research.
Cheers,
m.
Nodereference Explorer + Insert
This is in my opinion very promising: http://drupal.org/node/667192
Nodereference Explorer + Insert
-----
Drupal Development by Trio Interactive
That's exactly what I'm
That's exactly what I'm looking for! Still not ready for live use from what I gather tho.
Thanks.
subscribing
subscribing
Excellent!
Thanks for this - really useful stuff!
wysiwyg_imageupload
Well there is one missing : http://drupal.org/project/wysiwyg_imageupload
I would add it, but iam biased as iam the developer. Maybe someone else can do it:
older podcast : http://www.youtube.com/watch?v=LEKpvI1G8qE
reviews: http://drupal.org/node/692070
Drush quicksetup (with clean drupal): http://drupal.org/node/835242 .. ( for testing )
Hi Eugen Sorry for the delay,
Hi Eugen
Sorry for the delay, and for missing out your module. I'll try and take a look over the weekend and add its details.
Thanks,
Andy
*shame-faced* Took me a just
*shame-faced* Took me a just a bit longer than anticipated!
No worries :) just some
No worries :)
just some infos:
I think one of the major points with WYSIWYG imageu upload is, that it exports an API. I think there is no other module doing this.
Wit this API you can do quiet some stuff. There is a special "submodules" API e.g. which allows you to quick implement new fields to the image, like exif informations, som descriptions, licence / author or what ever you like. the core module itself stays small and you can add specific things for your website / context very easy. E.g. the lightbox integration is done using this apporach. You have a checkbox where you can select whether this picture should have a litghbox popup or not. you could actually use this module and copy / & paste it for any other popup implementation.
And in the end, you can also do a "node for each image" implementation due to the hooks provided. All you need is create a node with an imagefield, attaching the FID there - thats it. Maybe then implementing a theming method so if you click on the picture - you land on the node ( plus showing the comment count ) . thats it, i expect ~30 lines in a submodule for this.
If you need the node thing for Views integration, WUI has views integration now ( in the next release ), and is its based on the file-api (core), you can pretty do anything generic you like with the images, like described above.
You can do advanced things with the theme API also - in the end this module is just giving you the power to bring the images into the context your website needs it. Inline images arent only "pictures", sometimes they have a deeper meaning. E.g. sharing photos on a photo-community website. you would need author / descriptions / comments / licence and stuff. And all this can be done very easy :)
Here is more : http://drupal.org/node/809604
But yes iam biased!!! :)
BTW, i created a list of available inline-image modules here: http://groups.drupal.org/node/84209 .. i crossed posted this entry, as its perfectly related. Thank you for your work and time!
shubscribing!
Cheers for this...quality stuff! :)
I found yet another module
I found yet another module from Aaron of media module:
Node Reference/Embed Media Browser
Scott Jackson
Wollongong Australia
Thanks Scott, I looked into
Thanks Scott,
I looked into it, and it looks fantastic, but isn't ready for production use yet. I've added a description at the top of the page.
WYSIWYG ImageField
I felt quite excited finding WYSIWYG ImageField module, as it is like finding another missing piece from the puzzle.
I like Insert as it ties together the two opposing strategies of fields and in-line images, but the interface becomes unwieldy with any more than a few images. WYSIWYG ImageField brings a more familiar face to Insert, by adding a button to your editor.
I like FileField Sources, but it uses IMCE as a browser; WYSIWYG ImageField gives it a new Views-based image browser.
The author is open to suggestions, and is now working on ImageField Extended module also to provide more options.
Scott Jackson
Wollongong Australia
Subscribing. Excellent posts!
Subscribing. Excellent posts!
Really interesting topic
Thank you very much for the research done so far!
node reference explorer + automodal + Modal Node Reference
Hi I'm using node reference explorer, and still developing. I made two nodes, picture with imagefield and story with NRE but I,m stuck in the idea how to create new picture node while I'm in NRE modal frame. Is there a way to make a link(add picture node) in NRE modal frame, then this add picture node show in modal frame. With theming modal frame I can create a link to add picture node, but not display just like modal frame, It just display in new windows tab.
My newspaper website almost done, but I'm stuck in this add picture node. I've tried many keywords in googling, but I'm still not find any clue. Maybe my bad in english makes me hard to find the clue.
NEW update
after searching and trying at drupalmodules.com, i found the way that almost meet my need. i user NRE + modal frame tu browse existing image, and automodal + Modal node reference to create new image node. this post help me so much, so i dont need to try so many module.
inline images
"really interesting posts"...I'm sure this is true for some people...but OMG, this absolutely critical stuff for modern readability and layout. What am I missing? it's 2011 already!!
Still fighting with it. Little miserable bugs. For example, sometimes the copy slightly overlaps inline images regardless of the <a href or img align margin settings... but not in preview mode. And can't seem to link image itself to story/node if image is a separate node.
"remove unnecessary modules before upgrading to D7"...who can tell which ones are partly necessary...now to solve these problems I need to load more modules.
still...Love Drupal's present and future potential functionality...just hope they do it first.
Although thinking about the upgrade routine gives me a migraine, does anybody know if any of these problems have been solved in D7?
Very interesting selection of
Very interesting selection of possibilities, but no clear winning combo. I checked out a lot of these modules and none of the ones I looked at even mention Drupal 7. Does anyone know which subset of modules are being actively developed for D7 taking core Fields into account? That might help narrow the options.
Drupal 7
http://drupal.org/project/insert
Note that D7 includes Imagefield/Imagecache functionality in core.