How can I add multiple images to a gallery at once?

I have uploaded a large number of photos to a asset folder. I would like to save this folder as a gallery object (data component: image gallery).
I don’t want to drag and drop photos one by one, I want to add several photos at the same time. Is this possible and how does it work?

Thanks a lot

not yet possible, but would be a nice feature. We’re happy to merge PRs for that :slight_smile:


Christian, having such a feature would be really great. We solved our current problem with PHP. We read all images from an asset folder and generate a gallery (fixed title) via URL call . We used the code example from “Populate an ImageGallery” from the Pimcore docu as basis.

	public function galleryFromAssetsAction(Request $request) {

		$list = new \Pimcore\Model\Asset\Listing();
		// Path to our asset folder
		$list->setCondition("path LIKE :path", ["path" => "%/Galleries/Formgallery/"]);

		// Create new Object wich contains the ImageGallery
		$ourgallery = new DataObject\Gallerie();
		// We set here a fixed object/gallery name
		// Folder ID where the gallery will be saved 

		$galleryData = $list;

		$items = [];
		foreach($galleryData as $img){

		$advancedImage = new \Pimcore\Model\DataObject\Data\Hotspotimage();
		$items[] = $advancedImage;

 		$ourgallery->setImagegallery(new \Pimcore\Model\DataObject\Data\ImageGallery($items));
		$response = new Response();
		$response->setContent('<h1>Gallery created</h1>');
		return $response;



Thanks for your interest.

Hi, i thought I already created a PR for that and it was merged. It did not work on folder drag and drop I think but did work when you selected multiple images in the tree (shift or ctrl) and dropped them into the gallery.
If I didn’t I can create the PR.