Bug report : Small hack for supporting SVG thumbnails
-
This is a turnaround, because PHP getimagesize() does not manage SVG (vector format…) and sets a 1×1 pixel size in that case. On the page, the wordpress thumbnail is therefore set to 1×1, almost invisible.
In /wp-includes/media.php, function wp_get_attachment_image(), line 550 :
replace :
$hwstring = image_hwstring($width, $height);
withif($image[1] == 1 && $image[2] == 1) $hwstring = '<img '; else $hwstring = image_hwstring($width, $height);
… would allow a nice thumbnail to be displayed.
Thanks !
Yann Lossouarn
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Bug report : Small hack for supporting SVG thumbnails’ is closed to new replies.