Xpressengine\Media\Models\Image::render PHP Method

render() public method

Rendered media
public render ( array $option = [] ) : string
$option array rendering option
return string
    public function render(array $option = [])
    {
        if (isset($option['responsive']) && $option['responsive'] === true) {
            return '<img src="' . $this->url() . '" style="max-width: 100%" />';
        }
        $width = Arr::get($option, 'width') ?: $this->width;
        $height = Arr::get($option, 'height') ?: $this->height;
        return '<img src="' . $this->url() . '" width="' . $width . '" height="' . $height . '" />';
    }