Insert "MANY" pictures at one Time

I've been creating a "EventPictures" Page... clicking add, clicking the first picture, clicking insert,clicking add, clicking the second picture, clicking insert,clicking add, clicking the third picture, clicking insert,[...]clicking add, clicking the 89th picture, clicking insert,and so on... it took me like 1 hour...Please add the possibility to insert many pictures at one click.

Comments

It would be nice when a category is selected, to be shown only the pictures from that category, it is easier to maintain the gallery block, now all pics are shown when a new pic is inserted. Also it would be nice to be shown, when a category is picked up, only those pics (of that category, and not the entirely ones) If possible to be implemented, one of our fellow did that.....

Hi guys, I think I do have an idea about inserting many images at once in a gallery block without going through the click, click, click routine but I'm afraid some being not so comfortable with the code might find it a bit confusing at first nevertheless it is a really simple thing to do - just copy/ paste some lines and alter some simple values.

However before we get to that some simple preparations should be done as well

Here is how I think it should take place and the way I actually made it working:

PLEASE DO KNOW YOU'RE DOING THIS AT YOUR OWN RISK AND THERE IS A CHANCE YOU MIGHT MESS UP YOUR PROJECT so make sure you're doing whatever you are to do on a backup copy of your project. Personally what I do is just publishing the site in a folder on my local hard drive - the project.mobirise file which also gets exported there along with the assets folder next to it are quite enough to get the project restored back in the state it has been at the time it got published.

The concept behind all this is that the project file we just talked about actually contains all the data about all the blocks in the particular project along with some extra details like the settings in the block's control panel, the custom styling applied to each block etc etc. The data is ordered in the so called JSON format which is rather strict in syntax so we need to be very careful applying any changes to it since if we mess something up the project might not start at all.

The project file needs the assets folder since it draws some files form there in order to display properly in Builder. Part of these files are all the images in the project.

I guess by now some must have guessed what I have in mind -we'll publish the project we want to experiment on in a new folder on the hard drive, copy/paste the images we need to include in the gallery then get a single gallery element, multiply it and just alter the file names by find and replace since multiplying a single element of the gallery the image name will initially remain the same in all the copies

In order this to go on lighter I think it is a good idea to name the images you want to include something brief and easy to remember. Personally I gave them numbers as file names and editing the project file went quite easy.

Implement:For this I'll be using the AgencyM4 theme which I find really amazing - maybe the greatest Mobirise Builder theme so far and the first with compatible blocks for inserting in other v4 themes (by now - the other v4 theme but I'm sure there are much more to come )To make the experiment a bit simpler I created a project with a single block - a gallery block and published it locally as mentioned above. I made this to hopefully make it a bit more clear

as it can be seen once you publish your project you need to copy the images which are about to be included in the gallery in the assets\images so after the edit the Builder to be able to get them. This is not a must - you can place them to a different folder and edit the entire string in the project file but I think that's the easiest way. As you can see the images are named simple - with numbers so it's easier later on

next step - opening the project.mobirise file for editing. Any decent text editor with search and replace function will do. The first time I did it with Visual Studio Code but now I've opened it in Notepad++ which is my personal favorite so far.

After the project file is opened we need to locate the gallery block - scroll down until you see something like this:

or just search down gallery until you get to it. From this point down the particular gallery images are described one by one.

take note of both highlights - the gray one wraps around the part we need to replicate by copy/pasting and the yellow - the pats which point to the image itself.

@PROJECT_PATH@ refers at his case to the current folder the project file is located

After replicating the snippet a few times we have left only to edit the file name which takes place as many times we have pasted the snippet. I'm using Find/Replace for ease but you can do it manually as well if that's more convenient to you

Take your time and replace all the strings making sure you also added the file extension and not only the name. I'm making the search/replace feature to look only for the name initially so I'm not typing the extension each time I alter the name of the image - like searching for gallery00 instead of gallery00.jpg and replacing with 11, 12 .. and so on which correspond with the names I've already given to my the images placed in the \assets\images directory.

That's basically it!

Now the only thing left is to save the file and head back to the Mobirise Builder where we should use the Import Mobirise Project feature and import the file we just saved

and the result is:

as you can see - all the images form the gallery of my buddy Sevo's gym got included right at the top of the gallery as we needed them to

VERY IMPORTANT! since the Builder uses the project.mobirise file all the way its project is being open - meaning upon open, while the project is loaded in the Builder and upon exiting - the project which file you are editing must NOT be the one being currently open in Mobirise Builder In order this to work you need to switch the active project right after publishing it to a local folder for editing. Please make sure you've done that

This workaround covers only the most basic intrusion - assigninng the file names to point to the proper images and can be easily expanded with adding tags in the corresponding fields like this:

Just make sure you've kept everything between the quotes and are using the exact same word for the tags. Also as far as I remember the Mobirise Builder Gallery Block allowed multiple tags for an image, so if you separate them with coma (NOT comma and a space but just comma) you can easily add a few of them to a single image - for example in the picture below we have three tags assigned to a single image.

And btw after importing the project all the settings you have applied in the project file (if you followed the syntax correctly ) are getting reflected in the block's properties panel as well

So this way it is doable and actually - not so complicated at all to batch insert some files in a gallery block of a Mobirise Builder project. It requires nothing but some simple text edits and a pinch of extra attention not to mess up the syntax.

Hope this helps. Would be glad to know if someone has tried it and how it worked out - please do share

Hi. I am new with mobirise. This is old issue, please is there any other than users filyov way to add many pictures yet? I think, there must be some user friendly way. This is unusable for making big galleries. Thank you.