Creating an image and video resource

hi guys i’m new to modx so you might have to be patient with me

I am using modx v2.7.0

I need to add a resource that when visited will display image and youtube videos

the problem is someone else will have to add the images and videos without entering code

I’m not 100% sure how to go about it

I noticed there where some extras for image galleries, is there something similar for videos? oEmbed looks decent but requires code

do I maybe create a migx variable for video urls, then somehow do a foreach on those urls to automatically use oEmbed?

thanks in advance for any advice you can share


Welcome to the wonderful world of MODX! :slight_smile:

I can’t recommend enough the extra more gallery by It’ll enable you to manage both image and video media easily. There is a small premium to pay but you’ll find the UX for your client beyond any other solution and the setup minimal to get running.


thank you for taking the time to reply ikfranklin, it looks

there is an issue with your suggestion, I am only an intern at a firm and get no say in purchasing plugins for sites, I asked but no luck

so I have to find another way

No problem.

Unfortunately that’s how it goes sometimes but it’ll likely cost the company more in your time than to use the well supported and established extra :wink:

The other solutions would be to use a MIGX TV to create a gallery. This may offer some guidance on getting started with that:

I think there is also a youtube video demonstrating this also.

1 Like

that is great

would this work for a video gallery as well perhaps?

Yes you could create a field for a youtube video id perhaps and then in your chunk just detect if you should spit out an img element or the youtube embed if you wanted to mix and match. Otherwise just create a second chunk just for videos.

1 Like

If the person that does have a say in purchasing plugins has any questions about MoreGallery, please do pass those along to :wink: It does seem to fit your needs perfectly with image uploads and youtube embeds just by pasting in the URL. Very simple for the user, and for the developer/builder the templating is quite flexible as well.

I’m positive that MIGX will also work for your use case, but MIGX is more of a swiss-knife for any sort of (tabular) data, whereas MoreGallery is built specifically to do galleries well which benefits the user experience.

1 Like