Return img tag

@param  string $src
@param  string $alt
@param  string $Class
@param  array $attributes
@return string
970138
public function img($src, $alt = '', $class = '', $attributes = [])
    {
        return sprintf('<img src="%s" alt="%s" class="%s" %s>',
            $this->url($src),
            $alt,
            $class,
            $this->HtmlAttributes($attributes)
        );
    }
478916
public static function imagePolaroid($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_POLAROID;
        return self::image($src, $alt, $htmlOptions);
    }
490424
private function createImageTag($filename, $attributes)
    {
        $img = '<ac:image';

        foreach ($attributes as $name => $value) {
            if ($name == 'style') {
                $re = '/float:\s*?(left|right);?/';
                if (preg_match($re, $value, $matches)) {
                    $img .= ' ac:align="' . $matches[1] . '"';
                    $value = preg_replace($re, "", $value, 1);
                }
            }

            $img .= ' ac:' . $name . '="' . htmlentities($value, ENT_QUOTES, 'UTF-8', false) . '"';
        }

        $img .= "><ri:attachment ri:filename=\"$filename\" /></ac:image>";

        return $img;
    }
511120
public function getPhoto($attributes = [], $type='original', $onlyUrl = false, $modelSlug = null, $relation = null)
    {
        $this->setAttributes($modelSlug,'photo');
        $photo = $this->getFile();

        if( ! is_null($photo)) {
            $src = $this->getFileSrc($photo, $relation, $type);
        } else {
            $type = $type === 'original' ? 'biggest' : $type;
            $src = config("{$this->module}.{$this->modelSlug}.default_img_path") . "/{$type}.jpg";
        }

        $attr = $this->getHTMLAttributes($attributes);
        return $onlyUrl ? asset($src) : '<img src="'.asset($src).'" '.$attr.'>';
    }
400668
public static function get_attribute_html( $attributes = array() ) {
		$html = '';

		if ( ! $attributes ) {
			return $html;
		}

		foreach ( $attributes as $key => $attribute ) {
			$html .= ' ' . esc_attr( $key ) . '="' . esc_attr( $attribute ) . '"';
		}

		return $html;
	}
446288
public function imageTag($source, $alt = null, $attributes = [])
    {
        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];

        // E.g. image_tag('logo.png', "My Logo"); => <img src="http://localhost/assets/logo-f2331bb588d007ba354e5fa406f9f4aa.png" alt="My Logo">
        $alt = $alt ?: humanize(basename($source, ".".File::extension($source)));

        return app('html')->image($this->assetPath($source, $assetsOptions), $alt, $attributes);
    }
785932
public static function imageThumbnail($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_THUMBNAIL;
        return self::image($src, $alt, $htmlOptions);
    }
674631
public function stylesheet($src, $attributes = [])
    {
        $attributes['rel'] = 'stylesheet';
        $attributes['href'] = $src;
        $tag = new Tag('link', $attributes);
        return $tag;
    }
1096798
public function image($url, $alt = null, $options = [])
    {
        $options['alt'] = $alt;

        return '<img src="'.$this->_generator->asset($url).'"'.self::attributes($options).'>';
    }
1200734
public static function tag( $name, $attributes = array(), $value = null, $close = true, $selfClose = false )
    {
        //	Nah nah...
        if ( true !== $close )
        {
            $close = $selfClose = false;
        }

        $_html = static::openTag( $name, $attributes, $selfClose );

        if ( false !== $selfClose )
        {
            return $_html;
        }

        if ( null !== $value )
        {
            $_html .= trim( $value );
        }

        if ( $close )
        {
            $_html .= static::closeTag( $name );
        }

        return trim( $_html );
    }
725996
public static function getRuneIcon( int $rune_id, array $attributes = [] ): Html
	{
		self::checkInit();

		$attrs = array_merge([ 'alt'   => $rune_id ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
		$attrs['class'] = implode(' ', [
			self::getSetting(self::SET_DEFAULT_CLASS),
			self::getSetting(self::SET_RUNE_ICON_CLASS),
			@self::getSetting(self::SET_CUSTOM_IMG_ATTRS, [])['class'],
			@$attributes['class'],
		]);
		$attrs['src'] = self::getRuneIconUrl($rune_id);

		return Html::el('img', $attrs);
	}
1152475
public static function getSpellIcon( string $spell_name, array $attributes = [] ): Html
	{
		self::checkInit();

		$attrs = array_merge([ 'alt'   => $spell_name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
		$attrs['class'] = implode(' ', [
			self::getSetting(self::SET_DEFAULT_CLASS),
			self::getSetting(self::SET_SPELL_ICON_CLASS),
			@self::getSetting(self::SET_CUSTOM_IMG_ATTRS, [])['class'],
			@$attributes['class'],
		]);
		$attrs['src'] = self::getSpellIconUrl($spell_name);

		return Html::el('img', $attrs);
	}
923067
public static function inputImage(string $name = '', string $src = '', array $attributes = []): string
    {
        $defaultAttributes = ['method-get' => false, 'class' => 'formImage'];
        $userAttributes = \array_merge($defaultAttributes, $attributes);
        $attributes = [];
        $attributes['type'] = 'image';
        $attributes['name'] = $userAttributes['method-get'] === false ? \sprintf('MFVARS[%s]', $name) : $name;
        $attributes['src'] = $src;
        $attributes['id'] = isset($userAttributes['id']) ? $userAttributes['id'] : $name;
        $userAttributes = static::clearAttributes($userAttributes, ['method-get', 'id']);

        return Tags::input(\array_merge($attributes, $userAttributes));
    }
302453
protected function handleTag_img()
    {
        if (!$this->parser->isStartTag) {
            return; // just to be sure this is really an empty tag...
        }

        if (isset($this->parser->tagAttributes['title'])) {
            $this->parser->tagAttributes['title'] = $this->decode($this->parser->tagAttributes['title']);
        } else {
            $this->parser->tagAttributes['title'] = null;
        }
        if (isset($this->parser->tagAttributes['alt'])) {
            $this->parser->tagAttributes['alt'] = $this->decode($this->parser->tagAttributes['alt']);
        } else {
            $this->parser->tagAttributes['alt'] = null;
        }

        if (empty($this->parser->tagAttributes['src'])) {
            // support for "empty" images... dunno if this is really needed
            // but there are some test cases which do that...
            if (!empty($this->parser->tagAttributes['title'])) {
                $this->parser->tagAttributes['title'] = ' ' . $this->parser->tagAttributes['title'] . ' ';
            }
            $this->out('![' . $this->parser->tagAttributes['alt'] . '](' . $this->parser->tagAttributes['title'] . ')', true);

            return;
        } else {
            $this->parser->tagAttributes['src'] = $this->decode($this->parser->tagAttributes['src']);
        }

        $out = '![' . $this->parser->tagAttributes['alt'] . ']';
        if ($this->linkPosition == self::LINK_IN_PARAGRAPH) {
            $out .= '(' . $this->parser->tagAttributes['src'];
            if ($this->parser->tagAttributes['title']) {
                $out .= ' "' . $this->parser->tagAttributes['title'] . '"';
            }
            $out .= ')';
            $this->out($out, true);
            return;
        }

        // ![This image][id]
        $link_id = false;
        if (!empty($this->footnotes)) {
            foreach ($this->footnotes as $tag) {
                if ($tag['href'] == $this->parser->tagAttributes['src']
                    && $tag['title'] === $this->parser->tagAttributes['title']
                ) {
                    $link_id = $tag['linkID'];
                    break;
                }
            }
        }
        if (!$link_id) {
            $link_id = count($this->footnotes) + 1;
            $tag = [
                'href' => $this->parser->tagAttributes['src'],
                'linkID' => $link_id,
                'title' => $this->parser->tagAttributes['title']
            ];
            array_push($this->footnotes, $tag);
        }
        $out .= '[' . $link_id . ']';

        $this->out($out, true);
    }
790855
public static function imageHtml($src, $alt = '', $width = 0, $height = 0)
    {
        return self::element('img', [
            'src' => $src,
            'alt' => $alt,
            'width' => ($width ?: null),
            'height' => ($height ?: null),
        ]);
    }
1077278
public static function div($content, $class = '', array $attributes = null) {
        return self::tag('div', $content, self::add_class($class, $attributes));
    }
502374
public function script($src, $attr = array())
    {
        $src = $this->Assets->getScript($src);
        $attr['src'] = $src;
        return $this->tag('script', $attr, '', true);
    }