Returns a new Semantic image
@see http://phpmv-ui.kobject.net/index/direct/main/55
@see http://semantic-ui.com/elements/image.html
@param string $identifier
@param string $src
@param string $alt
@param string $size
@return HtmlImage
483609
public function htmlImage($identifier, $src="", $alt="", $size=NULL) {
		return $this->addHtmlComponent(new HtmlImage($identifier, $src, $alt, $size));
	}
1073663
public function imageGetIntermediateSize($data, $post_id, $size) {
	    $result = $this->buildImgixImage($post_id, $size);

	    if (is_array($result) && !empty($result)) {
            $data['url'] = $result[0];
        }

		return $data;
	}
623872
public function img($email = '', $alt = '', array $attr = [])
    {
        if (empty($email)) {
            $email = $this->_options['email'];
        }

        $img = '<img src="'.$this->src($email, $attr).'"';

        if (!empty($alt)) {
            $img .= ' alt="'.$alt.'"';
        }

        if (isset($attr['width'])) {
            $img .= ' width="'.$attr['width'].'"';
        }

        if (isset($attr['height'])) {
            $img .= ' height="'.$attr['height'].'"';
        }

        return $img.'>';
    }
365607
public function thumb(string $src, string $dst, integer $width, integer $height)
    {
        $anchor='center';
        return $this
        ->image($src)
        ->thumbnail($width, $height, $anchor)
        ->toFile($dst);
    }
205606
def internal(identifier, size):
    '''
    
    '''
    identicon = generate_pydenticon(identifier, size)
    response = send_file(io.BytesIO(identicon), mimetype='image/png')
    etag = hashlib.sha1(identicon).hexdigest()
    response.set_etag(etag)
    return response
424689
public function fit($src, $dest, $width, $height){
        // Calculate
        $size = getimagesize($src);
        $ratio = max($width / $size[0], $height / $size[1]);
        $old_width = $size[0];
        $old_height = $size[1];
        $new_width = intval($old_width * $ratio);
        $new_height = intval($old_height * $ratio);
        // Resize
        @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
        $image = imagecreatefromstring( file_get_contents( $src ) );
        $new_image = wp_imagecreatetruecolor( $new_width, $new_height );
        imagecopyresampled( $new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $old_width, $old_height);
        if ( IMAGETYPE_PNG == $size[2] && function_exists('imageistruecolor') && !imageistruecolor( $image ) ){
            imagetruecolortopalette( $new_image, false, imagecolorstotal( $image ) );
        }
        // Destroy old image
        imagedestroy( $image );
        // Save
        switch($size[2]){
            case IMAGETYPE_GIF:
                $result = imagegif($new_image, $dest);
                break;
            case IMAGETYPE_PNG:
                $result = imagepng($new_image, $dest);
                break;
            default:
                $result = imagejpeg($new_image, $dest);
                break;
        }
        imagedestroy($new_image);
        return $result;
    }
785932
public static function imageThumbnail($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_THUMBNAIL;
        return self::image($src, $alt, $htmlOptions);
    }
892305
public function addImage($src, $style = null) {
		$image = new PHPWord_Section_Image($src, $style);
		
		if(!is_null($image->getSource())) {
			if($this->_insideOf == 'section') {
				$rID = PHPWord_Media::addSectionMediaElement($src, 'image');
			} elseif($this->_insideOf == 'header') {
				$rID = PHPWord_Media::addHeaderMediaElement($this->_pCount, $src);
			} elseif($this->_insideOf == 'footer') {
				$rID = PHPWord_Media::addFooterMediaElement($this->_pCount, $src);
			}
			$image->setRelationId($rID);
			
			$this->_elementCollection[] = $image;
			return $image;
		} else {
			trigger_error('Source does not exist or unsupported image type.');
		}
	}
354031
public static function imageCircle($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_CIRCLE;
        return self::image($src, $alt, $htmlOptions);
    }
758384
public function htmlimg($src, array $attribs = array(), $internal = true)
    {
        if (isset($attribs['src'])) {
            unset($attribs['src']);
        }

        if ($internal) {
            $src = $this->view->media($src);
        }

        $xhtml = '<img ';
        $xhtml .= 'src="' . $src . '" ';
        $xhtml .= $this->_htmlAttribs($attribs);
        $xhtml .= $this->getClosingBracket();

        return $xhtml;
    }
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));
    }
53856
protected function prepareImage($picture, $alt = '') {
    $value = NULL;
    $files = $this->loadByUuid('file', $picture);

    if ($files instanceof File) {
      $value = [
        [
          'target_id' => $files->id(),
          'alt' => $alt ?: 'file' . $files->id(),
        ],
      ];
    }

    return $value;
  }
62621
public function addImage($src, $style = null) {
		$image = new PHPWord_Section_Image($src, $style);
		
		if(!is_null($image->getSource())) {
			$rID = PHPWord_Media::addSectionMediaElement($src, 'image');
			$image->setRelationId($rID);
			
			$this->_elementCollection[] = $image;
			return $image;
		} else {
			trigger_error('Source does not exist or unsupported image type.');
		}
	}
331653
public static function getImage($id, $size = "moyen", $showDefault = true, $dimension = array('height'=>200,'width'=>200))
    {
        global $config;
        $req = "
            SELECT idImage
            FROM _personneImage
            WHERE idPersonne = '".mysql_real_escape_string($id)."'
        ";

        $res = $config->connexionBdd->requete($req);
        if ($fetch=mysql_fetch_object($res)) {
            $req = "
                SELECT dateUpload, idHistoriqueImage
                FROM historiqueImage
                WHERE idImage = '".$fetch->idImage."'
            ";
            $res = $config->connexionBdd->requete($req);
            $fetch = mysql_fetch_object($res);
            if (isset($fetch->idHistoriqueImage)) {
                if ($size=="resized") {
                    return "resizeImage.php?id=".$fetch->idHistoriqueImage."&height=".$dimension['height']."&width=".$dimension['width']."";
                }
                return $config->getUrlImage($size).$fetch->dateUpload.'/'.$fetch->idHistoriqueImage.'.jpg';
            }
        }
        if ($showDefault) {
            return "images/avatar/default.jpg";
        }

    }
755797
public function htmlImage($src, array $attributes = array()) {
        $attributes['src'] = $src;
        $html = '<img' . $this->_htmlAttribs($attributes) . '>';
        return $html;
    }
675770
public function htmlModal($identifier, $header="", $content="", $actions=array()) {
		return $this->addHtmlComponent(new HtmlModal($identifier, $header,$content,$actions));
	}
1042830
public static function ImageFactory($src, $thumb="", $title = "", $caption="", $width="", $height="")
	{
		return new XmlnukeMediaItem($src, $thumb, $title, $caption, $width, $height);
	}