Media

Optimizing media for every conceivable use case would take forever. Nobody has time for that. I'ts better to manipulate and optimizes your media on the fly, so as you add uses cases your media adapts to fit, not the other way around.

Each media item in your database has a unique URL made of of:

https://pub.tools/file
/
database id
/
file id
?
manipulations

Image Manipulation

Image manipulations are formatted as a standard URL search string:

?
property
=
value
&
property
=
value
& ...

Configurable properties are:

Width

Set the width of the image, in pixels. For example:

Height

Set the height of the image, in pixels. For example:

Fit

When you set both a width and a height, the fit property lets to control how your image fits within that space. Possible values are:

For example:

Position

When your image is being cropped or letterboxed, you can use the position to control where the image is placed.

The default value is center, other options are:

For example: