Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Maintain image ratio by default when resizing

  • Loading branch information...
commit 1b4a03c27d189714f45091d0419d9db4f10f574e 1 parent 8c8c45c
@kolber authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  extensions/twig-extensions.inc.php
View
3  extensions/twig-extensions.inc.php
@@ -68,7 +68,8 @@ function get($url, $current_url = '') {
#
# shortcut to generate the image resize path from a full image path
#
- function resize_path($img_path, $max_width = '100', $max_height = '100', $ratio = '1:1', $quality = 100) {
+ function resize_path($img_path, $max_width = '100', $max_height = '100', $ratio = 0, $quality = 100) {
+
$root_path = preg_replace('/content\/.*/', '', $img_path);
$clean_path = preg_replace('/^(\.+\/)*content/', '', $img_path);
Please sign in to comment.
Something went wrong with that request. Please try again.