Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Resize and crop images on the fly.

Notifications You must be signed in to change notification settings

mecha-cms/x.plugin.thumbnail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Thumbnail Plugin for Mecha

Resize and crop images on the fly.

URL Pattern

  • /t/<width>/<path> → proportional image resize
  • /t/<width>/<height>/<path> → proportional image resize and crop
  • /t/<x>/<y>/<width>/<height>/<path> → crop image without resize

Example

http://localhost/t/200/path/to/image.jpg
http://localhost/t/200/200/path/to/image.jpg
http://localhost/t/30/60/200/400/path/to/image.jpg

Description

  • <width> → the image width
  • <height> → the image height
  • <x> → horizontal position from the original image corner
  • <y> → vertical position from the original image corner
  • <path> → the image path, relative to the lot\assets folder.