lucas Posted November 8, 2014 Share Posted November 8, 2014 I have more than 1000 images that I want to upload on ProcessWire. Is there any way to batch upload all the images and automatically create one page for each one of them? Including their fields, like categories and tags? Link to comment Share on other sites More sharing options...
kixe Posted November 9, 2014 Share Posted November 9, 2014 No, just create an imagefield assign it to the template where you want it. Create your foto page and select multiple image files to upload in one step. Done!1000? It will take a while ...Cannot read anymore ... Maybe this is your friend:http://modules.processwire.com/modules/process-batcher/ Link to comment Share on other sites More sharing options...
Macrura Posted November 9, 2014 Share Posted November 9, 2014 yes, would be pretty easy, but not sure what you mean about categories and tags; are those in a spreadsheet, or part of the filename? mass upload of files and then import to pages could be done with a small utility module that could be run on the page after you save, if this is a functionality that needs to be performed on a regular basis; foreach($page->images as $image) { $newImage = new Page(); $newImage->template = 'image'; // or whatever the template is $newImage->parent = 'whereever_you_are_keeping_these'; $newImage->title = 'some_title'; $newImage->save(); // Show message // if using in a module: $this->message("Image added: {$newImage->title}"); //or if running the api: echo "Image added: {$newImage->title}"; } // end foreach if you don't need something that can be run anytime from the admin, then you could just use a CSV file with a folder of images Link to comment Share on other sites More sharing options...
horst Posted November 9, 2014 Share Posted November 9, 2014 @lucas: If I understand you right, you want to do this upload only once? If yes, you simply may use a custom installer script. Please can you tell a bit on how you have setup things? Your PW installation is an online installation? The imagefiles are on your local computer actually, but if needed, you also have SSH or FTP access to the PW site? Where have you stored the fieldinformations (categories, tags)? CSV, ImageMetadata, a DB? Or do you have a local PW installation with the 1000 image pages and fields for cats, flags, etc and want to upload only those imagepages and not other parts form the local install? Depending on your answers it will be very easy to build an importer script for you. 1 Link to comment Share on other sites More sharing options...
Soma Posted November 9, 2014 Share Posted November 9, 2014 Or use my Images manager module. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now