Get width and height from media svg

Hello

I try to get height and width from svg media file, image_width return null but when el_footer_logo is png or jpg it return correct value.

{# LOGO #}
{% set el_footer_logo = page.header.el_footer_logo %}
{% set image_width = page.media[el_footer_logo].width %}
{% set image_height = page.media[el_footer_logo].height %}

Maybe be i miss something or maybe it’s an issue.

I imagine this would depend on the .svg, as they do not necessarily have an explicit width set initially. By nature they are vector-files, so size is irrelevant, and I think the image-processing back-end (Gregwar) checks file metadata for this - which for a .svg would as you note, return null, because it is only set through HTML-attributes and are generally considered superfluous (control .svg-size through CSS, not HTML).

@OleVik yes you’re right, it make sense, thanks a lot