Skip to content

Commit befa273

Browse files
Fallback for regular size keyword
1 parent f4334e4 commit befa273

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

wordpress/wp-content/themes/les-verts/lib/twig/functions/image-filters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getTimberImageResponsive(Environment $env, $image, $size = 'medi
3030
$size = 'full';
3131
}
3232

33-
if(!is_string($size)) {
33+
if(!is_string($size) || $size === 'regular') {
3434
$size = 'medium';
3535
}
3636

wordpress/wp-content/themes/les-verts/lib/twig/functions/image-handling.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ function image_downsize_fallback($out, $attachment_id, $size) {
223223
return false;
224224
}
225225

226-
if(!is_string($size)) {
227-
$size = 'regular';
226+
if(!is_string($size) || $size === 'regular') {
227+
$size = 'medium';
228228
}
229229

230230
$upload_dir = wp_upload_dir();

0 commit comments

Comments
 (0)