This project is read-only.

Orchard "Image Gallery" module, please tell your thoughts.

Topics: Customizing Orchard, Writing modules
Oct 19, 2012 at 10:10 AM

I'd like to share some thoughts from people who like "Image Gallery module" (

It had no updates since last year and I'd like to "change" this. ;)

We've already discussed some details with Gabriel (author of the module), mostly thinking about extensibility points for developers. Main use cases are the following:

  • Allow to "tweak" image generation and thumbnail generation process - allow Watermarks and other effects to implement.
  • Have an events of image and thumbnail creation process.
  • Allow developers to add custom frontent JS libraries and show them in the dropdown.

Is there anything you can add?

I'd also like a technical advice, how it might look the best?

  • (point 1) Is it a good idea to use Rules for thumbnail generation?
  • (point 2) Does it make sense if Rules will be used?
  • (piont 3) Look like the Provider with Name and Shape would be enough for that.

Oct 21, 2012 at 7:40 PM

Ok, I have an Idea of implementing it:

Main objects

Asset (represents the media file - image atm):

  • name - alternative text
  • alternative text. Implement as ContentType later,
  • originalFileLocation
  • Events (+uploaded)
  • It should be possible to get a List of Presentations it is applied to.

Gallery (Represents a container of Assets):

  • There should be an option to recreate all effects for assets in the container.

Here comes more:

  • UiRendererProvider (responsible for frontend) consists of Shape and List<Presentation> properties.
  • Presentation (responsible to provide an asset in required format) consists of Size,Location, and set of Queue<Effects>
  • Effect (responsible to modify the bitmap, can be combined into chain) Implementation of the effect with an optional Form.

Finally, the GallreyPart wires up everything together:

  • Gallery reference.
  • UiRenderer reference.

and some HtmlHelper extensions.

Critics/comments is very appreciated.

Oct 21, 2012 at 9:36 PM

You should also be aware of a future improvement in media scheduled for 1.7 : Media Processing 

Sebastien Ros made a demo at Orchard Harvest conference.

It will allow you to apply 'filter' when an image is uploaded, and for example, generate a thumbnail.

I guess the video of this session 'The future of Orchard' will be available soon : 

Bertrand could also give his opinion, because he made an interesting minimal implementation for a gallery module ( and did some improvements of the media for 1.6.

Oct 22, 2012 at 8:06 AM

Alright, thank you very much for pointing it out. I'm aware that there will be "something" in 1.7. but for unknown reason didn't realize that practically it is almost the same. The problem it that I need that functionality ASAP. I don't even see the planed release date for 1.7.

I'll look into the videos and try to find discussions about Media Processing.

Oct 22, 2012 at 1:42 PM

Hmm, I've seen all the videos, but find nothing except some basic words that "there will be a media management". Looks like it is not yet here :(

ZenGallery, yes, good module too but the most of the things are already implemented in Image Gallery. Ok, I suppose you are busy with next release atm, for now, if nobody interested, I'll modify the module just to meet my needs.

Oct 22, 2012 at 5:40 PM

There is also code:

Oct 23, 2012 at 9:42 AM

This is awesome, just exactly what I've been thinking to implement. And it will be a part of 1.7, right?

Currently there is a HtmlHelper around that, but no ContentPart for a gallery at the moment. I can try to integrate Gallery or ZenGallery with it, only one question so far: What is the best Orchard way to do it? The idea from the user perspective:

GalleryPart has:

  • a reference to the Media folder (to get the list of media files from)
  • render option to choose from available providers (basically it is a shape with the list of image references and JS which manage look and feel - slider, gallery, zoomer, pivot, etc.)
  • It might be useful to have "Regenerate" button, as I didn't find (just looking the code) the functionality which removes the images when profile parameters or it's filter parameters has changed.

I'm confused, I see two options here:

1. making the "Renderer" (need a better name for it) as a part of GalleryPart. 

  • Where to put "renderer" configuration form? As in the GalleryPart, there is a dropdown to choose renderer.
  • It is not possible/simple to show several "renderer"s for one gallery part. But this probably can be ignored

2. 1 renderer = 1 gallery part. so Renderer is the Part it self.

  • Won't it cause the "explosion" of ContentParts?
  • It is not possible to change the look of the gallery with single(or two) click.
Oct 23, 2012 at 10:07 AM

Option 3 is to make "Renderers" to be configured on some other page - similar to "Profiles". Then, in the gallery part there will be a dropdown wit precongured ones. Maybe it also need some validation, to check if required profile (one or several which is going to be used by the renderer) is exist in the system.

Oct 23, 2012 at 11:48 AM

You should attend to the weekly Lync meeting tonight to explain your suggestions to the comittee :

Every Tuesday at 12 PDT, 9 PM in Paris (I don't know what is your timezone)

Oct 23, 2012 at 3:51 PM
Edited Oct 23, 2012 at 3:52 PM

I agree with Antoine. The Podcast is the perfect time to aire your ideas.

Just make sure you are ready with a notepad! :)

Oct 23, 2012 at 6:30 PM

I appreciate that, but not this time, sorry. I'm babysitting today, hopefully next time. Will watch it as podcast. Can somebody give a word about that, if it is not already happened? I'm from Estonia. So it is UTC+2.