How to add class to the html() created element

I am trying to loop through some images and display the correct ones inside a newly created element. How do I add a class to this newly created element ?

    <div class="poza-produs">
                                        {% for item in produs.imagelogo %}
                                            {{ page.media[item.name].html()}}
                                        {% endfor %}
      </div>

—twig
{{ page.media[‘sample-image.jpg’].html(‘My title’, ‘Some ALT text’, ‘myclass’) }}

see [Learn.getgrav.doc](https://learn.getgrav.org/content/media#html-title-alt-classes)