KriesiMedia / enfold-library

Enfold WordPress Theme Code Snippet Library
82 stars 68 forks source link

AviaHtmlHelper display_image method update request for better SVG support #18

Closed josueochoa closed 1 year ago

josueochoa commented 4 years ago

Hello!

Just a little request to improve svg compatibility when using Image type elements, on AviaHtmlHelper display_image method (/config-templatebuilder/avia-template-builder/php/html-helper.class.php:2355), there's regex match that handles the popup backend preview rendering of the image:

if(preg_match('/^.*\.(jpg|jpeg|png|gif)$/i', $img))

Can svg be added to regex match, like:

if(preg_match('/^.*\.(jpg|jpeg|png|gif|svg)$/i', $img))

That way if a svg image is uploaded it will appear in the popup preview, and also allowing for its removal.

Screen Shot 2020-05-09 at 1 32 13 PM

Thanks!

InoPlugs commented 1 year ago

done