Free Open Source Dynamics 365 Photo Gallery: MMDPG for short

Many Microsoft Dynamics 365 projects require a photo gallery. About a year ago, I needed a free open source photo gallery to be embedded in Dynamics CRM custom and system entities to display photos attached to notes on any entity. After a lot of research, I only found “paid for” photo galleries and very little free open source Photo Gallery that can work with both Dynamics CRM Online and on-premise.

Hence, I decided to build my own Microsoft Dynamics 365 Photo Gallery and I’m now releasing it as another contribution to the Microsoft Dynamics community. The Dynamics 365 Photo Gallery utilises the open source FlexSlider photo gallery and the Dynamics CRM JavaScript libraries CRM Fetch Kit and XRM Service ToolKit.

Deployment is simple. There is one main web resource (tll_MMDPG.htm) that you embed as a web resource into any custom or system entity form on both Dynamics CRM Online and on-premise versions. Once embedded, it will read all your photos attached to notes on this record. Here is how it looks in CRM:

Dynamics Photo Gallery MMDPG

Important Notice: Microsoft Dynamics 365 Photo Gallery – MMDPG – is provided as is with no warranties under MIT license with the condition / requirement to preserve the name of the publisher and author (Mohamed Mostafa) and a copyright statement within the code to refer back to the author and the original solution.

Some of the built-in features and functionalities that the Dynamics 365 Photo Gallery (MMDPG) provides are:

Display all photos added as attachments to Entity Form Notes.

Only read and display photo attachments and ignore other file types.

Carousel Photo Gallery

Slideshow of photos

Start and Stop Slide Show

Thumbnails to select which photo to display

Next and Back arrows to move between different photos

Deployment Instructions:

Import the unmanaged CRM Solution MMDPG_x_x_x_x.zip

Publish All Customisations

The main web resource tll_MMDPG.htm can be found under the Solution components list.

Embed tll_MMDPG.htm as a web resource inside any of your entity forms both custom or system.

The gallery is made up of 15 files including MMDPG main web resource.
Make sure all 15 files are included in you CRM Solution and published.

MMDPG has been tested on Dynamics CRM Online 2016 (8.0 and 8.1), On-premise 365 and Dynamics 365 (8.2). However, I cannot see any reason for it not to work on other previous versions as it uses standard FetchXML calls.

Microsoft Dynamics 365 Photo Gallery MMDPG is provided free of charge, open source (MIT License with condition / requirement to preserve the author) and is available to download from this blog post (below). It is also available to download and contribute to on its Open source CodePlex project site. There is only one condition for the license which is the requirement to preserve the name of the owner and author (Mohamed Mostafa) and a copyright statement within the code to refer back to the author and this original work Dynamics 365 Photo Gallery MMDPG.

If you would like to contribute to this open source project by adding functionality and features, please get in touch via a comment below or through CodePlex. All contributor names will be listed here on the blog post. In addition to the author/publisher, current contributors are:

Anupam Khasa

… Contribute and get your name here

All enhancements and contributions are welcome. Please comment below if you want help or if you want to contribute.

Microsoft Dynamics 365 Photo Gallery - MMDPG - is provided as is with no warranties under MIT license with the condition / requirement to preserve the name of the publisher and author (Mohamed Mostafa) and a copyright statement within the code to refer back to the author and the original solution.

Thank you for bringing up the free source. I really appreciate it. I want to try to same thing in our production system. Actually, thing is if customer is buying any product from us like cable or fiber or any networks. We can have all details of product associated withe that customer so its nice to have the slideshow of the product in our CRM system. So , I tried to replica the same thing in our production system and couldn’t figure how to do also as I’m very much new to CRM. But, I have good skills in programming.

I would appreciate very much if you provide the step by step demonstration of how to get the images on the form using your solution on any entity as sample example.

It will be very helpful for me to do customize to our form.

Current version of CRM – Microsoft Dynamics 365
Version 1612 (8.2.0.749) on-premises

Hi Deepthi,
The Photo Gallery web resource needs to be embedded into the form of the entity where you keep your products. So if you have a custom entity called Products, you need to embed the web resource in the Product Entity form. To add photo, you will then need to add a note on the Product entity and attach the photo. Every photo need to be added as an attachment to a new note. 1 photo per note. You need to have at least 2 notes with attached photo.

I also would like to try out your solution as it sounds really nice. I followed the steps as you described, but after adding images to the Notes section, no images will be displayed in the web resource of my Account form.

brilliant idea and great job you have done! Im just trying to make it alive however without any success. It was successfully imported and I can add it as a web resource to my Form, however as a result I see only empty frame. Am running Microsoft Dynamics 365 Version 1612 (8.2.1.411) – online. Any ideas?

Hi again, sorry for delay. I havent received a notification on your reply and just realized you already replied. I tried everything you mentioned without any positive outcome. I can send you some print screens maybe?

Hi again, finally I made it work! It started working once I tick the Pass Record object type check box on the web resource. Its brilliant and I really like it. Any chance to get rid of slide show function and button. In our case its not needed. Also am having issue with formatting as with more than four pictures I get big white gap in between the main picture and thumbnails. I can send you a picture if you want. Thank you for your hard work, really appreciate it!