Mantra blog

Picserver: new Mantra base project

Picserver is a high performance image server with transformations of the pictures on the fly indicated in the url requested

A  A  A 

Mantra base or seed projects are intended to show how Mantra application are developed following Mantra principles and best practices, and to server as project starting point for your specific requirements.

We're glad this week to publish a new Mantra base project: [Picserver](file:///marketplaceproject/picserver@1.0.0).

Picserver is an image server, this is, an application where you upload your pictures as some kind of images CDN that you can link from your sites or any other purpose related to image processing.

Some features:

  • Virtually, any number of pictures can be uploaded, depending, obviously, of the disk space. The performance is not affected according the number of images uploaded (thousands or millions).

  • Simple transformation of images are done on-the-fly: this is, the client doesn't need to manage the same image with different resolutions, the server sends them according to the configuration of the url requested (some samples below), using selectors or formatters in the url.

  • There's a simple password mecanism to upload or remove images: just type a password you have created when installing the project, running the command:

$ mantrad change-upload-password
  • It shows a number of useful components developed using Mantra: some very basics (like generalprops), others much more complex (like workflows or tagging). Remember: developing Mantra applications is productive because you reuse a great number of Mantra components available.

  • Each image transformation requested is cached: this is, it is calculated once, because these transformations can take some delay to complete.

You can retrieve an image previously uploaded with the resolution you need using resize formatter in the url, like this:

With 'resize:w(120)', the image will be sent with 120 pixels width.

You can use bw (black & white) formatter in the url as well:

With the selector 'resize:w(240)/bw', the image will be sent with 240 pixels width and black & white.

Many other features are included in this base project. You can read more about it in its project section.

More components and base projects coming!

You may be also interested