Skip to content

createImage

MaelVB edited this page Jul 30, 2021 · 2 revisions

Create image

Use image on Aquila

Image folder

Every image is stocked in the Uploads folder (default: /uploads).

If you want to change this path you have to go in : Aquila admin > Settings > server settings > path & folder. In the field Medias path, you can choose a specific folder. For a specific folder, a relative path is required. This new path will be saved in the database in the collection "configurations" -> "environment" -> "photoPath".

Create image by URL

For each image in Aquila, we have a physical adress, but it's not advised to use it. You can use an automatically generated URL that allows you to crop and compress the image thanks to a cache systeme.

This format is :

  1. domain name / images

    • It is always the same for all of the sites
  2. type(products / media / gallery / slider / blog)

    • if it's a product type it will be : /products
    • if it's a medias type it will be : /medias
    • if it's a gallery type it will be : /gallery
    • if it's a slider type it will be : /slider
    • if it's a blog type it will be : /blog
  3. properties of picture (each properties are separated by "-")

    • size : height X width (200x100)
    • quality : in percentage (0 - 100)
    • (optional) crop : -center -top -bottom -left -right -top-left -top-right -bottom-left -bottom-right
    • (optional) background color : (default: -255,255,255, 1) -Decimal (RGB) -(.png only) Opacity (0 is transparent, 1 is visible)
  4. id in database

  5. dynamic name of this image for seo

Example

Here is the example URL : http://localhost:3010/images/medias/200x100-80/5d444efbede1945f660288d7/exempleImage.jpg

  • domain name / images is http://localhost:3010/images
  • type is /medias
  • properties of picture is 200x100-80
  • id in database is 5d444efbede1945f660288d7
  • dynamic name is exempleImage.jpg

Create image by interface

You can also create a new image in Aquila in Backoffice > media

Select "copy link"

  • Insert height
  • Insert width
  • Crop (yes / no) -(if yes) select position
  • Quality
  • Name (if you put in a name with a space, it will be deleted)
  • Background color (yes / no) (.png only)
    • (if yes) enter color in decimal (RGB)
    • (if yes) opacity(alpha) (0 is transparent, 1 is visible)

Click on "generate" and the field "link" will be complete

You can copy the link by clicking on "copy link"

Clone this wiki locally