MediaType/ImageMediaType.php
public function getPreview(MediaInterface $media, array $options = null)
    {
        $self_options = array(
            'html' => array(
                'class' => array(self::NAME),
                'alt' => ''
            ));

        if (is_array($options)) {
            $options = array_merge($self_options, $options);
        } else {
            $options = $self_options;
        }

        $class = (isset($options['html']['class']) ? $options['html']['class'] : "");

        if(is_array($class))
            $class = implode(' ',$class);
        elseif(!is_string($class))
            $class = '';

        $alt = (isset($options['html']['alt']) ? $options['html']['alt'] : "");

        $html = '<img src="/media/' . $media->getMediaTypeReference() . '" class="' . $class . '" alt="' . $alt . '"  />';

        return $html;
    }
public function getPreview(MediaInterface $media, array $options = null)
    {
        $self_options = array(
            'html' => array(
                'class' => array(self::NAME),
                'alt' => ''
            ));

        if (is_array($options)) {
            $options = array_merge($self_options, $options);
        } else {
            $options = $self_options;
        }

        $class = (isset($options['html']['class']) ? $options['html']['class'] : "");

        if(is_array($class))
            $class = implode(' ',$class);
        elseif(!is_string($class))
            $class = '';

        $alt = (isset($options['html']['alt']) ? $options['html']['alt'] : "");

        $html = '<img src="/media/' . $media->getMediaTypeReference() . '" class="' . $class . '" alt="' . $alt . '"  />';

        return $html;
    }
@param MediaInterface $media
@param array|null $options

@return string