Skip to content

Commit

Permalink
README updated
Browse files Browse the repository at this point in the history
  • Loading branch information
LCweb-ita committed Apr 15, 2021
1 parent c44ad7e commit b46de32
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,22 @@ Supports WP 3.5 WP_Image_Editor class, using **Imagick** where available.

// inline PHP function returning static image URL
<php
easy_wp_thumb($img_src, $width, $height, $quality, $alignment, $resize, $canvas_col, $fx);
easy_wp_thumb($img_src, $width, $height, $quality, $alignment, $resize, $canvas_col, $fx, $get_url_if_not_cached);
?>

// alternative way, using parameters array
<?php
$params = array(
'w' => (int|bool),
'h' => (int|bool),
'q' => (int),
'a' => (string),
'rs' => (int),
'cc' => (string),
'fx' =>(array),
'get_url_if_not_cached'=> (string|bool)
);
easy_wp_thumb($img_src, $params);
?>

// Timthumb-like async thumb creation (useful to not weight tons of processes on a single page)
Expand Down
2 changes: 1 addition & 1 deletion easy_wp_thumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
*
(int|bool) w - thumbnail's width. False to auto-calculate while using scaling function
(int|bool) h - thumbnail's height. False to auto-calculate while using scaling function
(int) q - thumbnail's quality: 0 to 100
(int) q - thumbnail's quality: 1 to 100
(string) a - thumbnail's cropping center. Possible values: tl, t, tr, l, c, r, bl, b, br. c = center, t = top, b = bottom, r = right, l = left
(int) rs - resizing method: 1 = Resize and crop, 2 = Resize and add borders, 3 = Only resize
(string) cc - background / borders color – use hexadecimal values
Expand Down

0 comments on commit b46de32

Please sign in to comment.