Built on top of Picturo, Picturo2.0 is a stupidly simple, blazing fast, flat file photo cum Album gallery running. No admin, you just need to drop your Pictures and Albums in the content to publish your pictures. Picturo is heavily inspired by Pico, but it’s for Photos and Albums.
You can try Picturo2.0 at Demo, actually the demo is private but you can login with the following credentials :
user : admin
password : admin
user : toto
password : admin
Login Login Fail Default Admin Albums Albums+Photos Album View Photo View Error View
To run Picturo2.0 you will need PHP 7.1.3+
, Twig 2.x (needs at least PHP 7.1.3 to run)
and GD Library
on your server. If you’re running Apache you will also require mod_rewrite
to be enabled.
First download Picturo2.0 and extract it on your server. Change ownership and permission of the cache folder to the user of your web server set permissions to 777
so you’ll be able to delete cache if needed.
Customize settings by editing config.php
in the root folder of Picturo. To override a setting simply uncomment it in config.php
and set your custom value.
Picturo2.0 can keep your galleries private, you just have to edit config.php
and set private variable to true and add a user. By default, there is an admin user with the password “admin” in the configuration file
. Just uncomment the two following lines to enable private galleries :
$config['private'] = true;
$config['admin_pass']['admin'] = 'sha512:1000:2Gp+SOuwkWQpMsemFvMyxfPtEfY/M77l:GrHLycEBPATCSmFCmd4onEynvfSoNR3Q';
$config['private_pass']['user'] = 'sha512:1000:2Gp+SOuwkWQpMsemFvMyxfPtEfY/M77l:GrHLycEBPATCSmFCmd4onEynvfSoNR3Q';
Passwords are SHA-1 strings, you can generate your passwords online here at sha1-online.
Your photos must be stored in content folder, if you want to add a gallery you just need to create a folder within your content folder. Galleries thumbnail are generated with the first picture found in the folder.
Picturo2.0 supports themes with Twig as templating engine they are located in the themes folder. All themes must include two files :
gallery.html
detail.html
If you want to keep your galleries private, you will need a third file “login.html”. Each file will have a basic set of variable, plus specific variable.
Default variables, available for all files :
{{ base_url }} : The URL of your site
{{ theme_url }} : The URL of your active theme
{{ site_title }} : The title of your website
{{ username }} : The logged in username (if you use private gallery)
Variables for gallery.html, which will list all folders and pictures :
{{ url }} : The current url
{{ breadcrumb }} : An hash containing a splitted array of URL. Keys are URL and values are folders name
{{ folders }} : An array containing folder objects for current url. Each folder has 3 attributes (url, thumbnail_url, name)
{{ images }} : An array containing image objects for current url. Each image has 3 attributes (url, thumbnail_url, name)
{{ page_count }} : The total count of pages for current url.
{{ current_page }} : The current page
Variables for detail.html, which will display one picture :
{{ breadcrumb }} : An hash containing a splitted array of URL. Keys are URL and values are folders name
{{ image_url }} : The URL of the current image
{{ image_previous_url }} : The URL of the previous image
{{ image_next_url }} : The URL of the next image
Variables for login.html, which will display the login form :
{{ login_error }} : Tell if login attempt was valid or not
{{ username }} : The username entered in login form input
For easy thumbnail generation in your theme, there is an helper function available in your views. You should use the function picturo_thumbnail in your views. For example, if you want to generate a squared 300px by 300px thumbnail, insert the following line in your view :
{% picturo_thumbnail(thumbnail_url, 300, 300) %}
Thumbnail will be automagically created in a folder matching the size of the thumbnail !
I plan to release some others theme later, but if your want to create your own I recommend to check the default theme and use Twig template for easy theming. And please, show me your theme if you want to share it.
Help make Picturo2.0 better by checking out the GitHub repository and submitting pull requests. If you find a bug please report it on the Issue page.
Picturo is heavily inspired by https://github.com/picocms/Pico, but it’s for Photos and Albums.