{# We use a different var here so we dont polute the existing image #}
{# Check if we have the ID on not if we do then assume we're an object or array #}
{% set picture_image = getImageObject(image) %}
<picture class="logo">
    {% for source in picture_image.sizes %}
        <source media="{{ source.media }}" srcset="{{ source.srcset }}">
    {% endfor %}
    <img src="{{ picture_image.src }}" alt="{{ picture_image.alt }}" style="width:auto;">
</picture>