Field::thumb
Version 3.7
Thumbnail src
Version 3.7
Thumbnail src
Return url to image thumbnail.
Thumbnail can have additional parameters:
Parameter | default | Description |
---|---|---|
s | 80 | Image max side (width or height). |
w | Width in px. If not given, uses s. | |
h | Height in px. If not given, uses s. | |
bg | #FFFFFF | Bacjground color, if thumbnail is clipped (round). |
sqr | 1 | Clip to square image . |
round | 1 | Round image. |
q | 100 | JPG compression rate. |
rotate | 0 | Rotate image for x degrees. |
fv | 0 | Mirror omage in vertically. |
fh | 0 | Mirrot image in horizontally. |
stretch | 1 | Stretch image to fit content. |
shadow | 0 | Add shadow. |
mirror | 0 | Add "reflection" -shadow. |
frame | 0 | Add border in px. |
fc | #FFFFFF | Border color. |
corner | 0 | Round corners: size,vy,oy,oa,va,round |
cacheAge | 3600 | Thumbnail cache age is seconds. |
String Image url
Create thumbnail with dimension of 180x180:
$img = "<img src='{$Product->image->thumb}&s=180' />";