Returns a thumbnail for this type of file.

@param bool $fullImageTag Set to true to retrieve the full HTML image tag, false to just retrieve the image URL

@return string
325727
public function getThumbnail($fullImageTag = true)
    {
        $app = Application::getFacadeApplication();
        $config = $app->make('config');
        $type = ThumbnailType::getByHandle($config->get('concrete.icons.file_manager_listing.handle'));
        if (file_exists(DIR_AL_ICONS . '/' . $this->getExtension() . '.svg')) {
            $url = REL_DIR_AL_ICONS . '/' . $this->getExtension() . '.svg';
        } else {
            $url = AL_ICON_DEFAULT;
        }
        if ($fullImageTag == true) {
            return sprintf(
                '<img src="%s" width="%s" height="%s" class="img-responsive ccm-generic-thumbnail" alt="%s">',
                $url,
                $type->getWidth(),
                $type->getHeight(),
                t(/* i18n: %s is a file type */ '%s file icon', mb_strtoupper($this->getExtension()))
            );
        } else {
            return $url;
        }
    }
1171002
public function getImage(): string
    {
        if (is_resource($this->image)) {
            $this->image = (string) stream_get_contents($this->image);
        }
        return $this->image;
    }
865730
public function getIsImage()
    {
        // Check file type
        $mime = $this->getMimeType();
        return $mime && in_array($mime, $this->config()->supported_images);
    }
858628
public function getThumbnail() : bool
    {
        if (!isset($this->params['v'])) {
            $this->params['thumbnail'] = '';
            return false;
        }

        $this->params['thumbnail'] =  'https://i.ytimg.com/vi/' . $this->params['v'] . '/hqdefault.jpg';
        return true;
    }
980348
public function getImagineImage()
    {
        if (null === $this->imagineImage) {
            $app = Application::getFacadeApplication();
            $resource = $this->getFileResource();
            $mimetype = $resource->getMimeType();
            $imageLibrary = $app->make(ImagineInterface::class);

            switch ($mimetype) {
                case 'image/svg+xml':
                case 'image/svg-xml':
                case 'text/plain':
                    if ($imageLibrary instanceof \Imagine\Gd\Imagine) {
                        try {
                            $imageLibrary = $app->make('image/imagick');
                        } catch (Exception $x) {
                            $this->imagineImage = false;
                        } catch (Throwable $x) {
                            $this->imagineImage = false;
                        }
                    }
                    break;
            }

            if (null === $this->imagineImage) {
                $metadataReader = $imageLibrary->getMetadataReader();
                if (!$metadataReader instanceof ExifMetadataReader) {
                    if ($app->make('config')->get('concrete.file_manager.images.use_exif_data_to_rotate_images')) {
                        try {
                            $imageLibrary->setMetadataReader(new ExifMetadataReader());
                        } catch (NotSupportedException $e) {
                        }
                    }
                }
                try {
                    $this->imagineImage = $imageLibrary->load($resource->read());
                } catch (FileNotFoundException $e) {
                    $this->imagineImage = false;
                }
            }
        }

        return $this->imagineImage ?: null;
    }
1038554
public static function getImageFromUrl($url = '')
    {
        try {
            $curl = new Curl();
            $curl->setOpt(CURLOPT_RETURNTRANSFER, TRUE);
            $curl->setOpt(CURLOPT_ENCODING, "");
            $curl->setOpt(CURLOPT_MAXREDIRS, 10);
            $curl->setOpt(CURLOPT_TIMEOUT, 30);
            $curl->setOpt(CURLOPT_CONNECTTIMEOUT, 30);
            $curl->setOpt(CURLOPT_FOLLOWLOCATION, TRUE);
            $curl->get($url);
            if ($curl->error === TRUE) {
                self::debug('Error Exception: ' . $curl->httpErrorMessage);

                return array(
                    'status'          => 'error',
                    'code'            => $curl->httpStatusCode,
                    'error'           => $curl->errorMessage,
                    'response_header' => $curl->responseHeaders,
                    'content'         => NULL
                );
            } else {
                return array(
                    'status'          => 'success',
                    'code'            => $curl->httpStatusCode,
                    'error'           => $curl->errorMessage,
                    'response_header' => $curl->responseHeaders,
                    'content'         => $curl->response
                );
            }
        }
        catch (\Exception $e) {
            if (function_exists('log_message')) {
                $message = 'Error Code: ' . $e->getCode() . ' - File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Message: ' . $e->getMessage();
                log_message('error', $message);
            }

            return file_get_contents($url);
        }
    }
274700
public function get_thumbnail()
	{
		if (!isset($this->data['thumbnail']))
		{
			if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail'))
			{
				$this->data['thumbnail'] = $return[0]['attribs'][''];
			}
			else
			{
				$this->data['thumbnail'] = null;
			}
		}
		return $this->data['thumbnail'];
	}
151078
public function getImageUrl()
    {
        return !$this->hasImage() ?
            $this->getImageDefaultUrl() :
            $this->_imageUrl($this->owner->getAttribute($this->imageAttribute));
    }
808263
public function getTagAttribute()
    {
        return ImageElement::img()
            ->isSelfClosing()
            ->src($this->getUrlAttribute() ?: false)
            ->alt($this->getAttribute('title') ?: false);
    }
556256
public static function getIconImage($svg = true)
    {
        $folders = [
            'client/dist/img/',
            'client/dist/images/',
            'dist/img/',
            'dist/images/',
            'img/',
            'images/',
        ];

        $extensions = [
            'png',
            'jpg',
            'jpeg',
            'gif',
        ];

        if ($svg === true) {
            array_unshift($extensions, 'svg');
        }

        $file = 'mapIcon';

        foreach ($folders as $folder) {
            foreach ($extensions as $extension) {
                if ($icon = ThemeResourceLoader::inst()->findThemedResource(
                    "{$folder}{$file}.{$extension}",
                    SSViewer::get_themes()
                )) {
                    return ModuleResourceLoader::resourceURL($icon);
                }
            }
        }

        return false;
    }
135533
public function getThumbnailUrl($sFile = '', $iThumbSize = null)
    {
        if ($sFile) {
            if (!$iThumbSize) {
                $iThumbSize = $this->_iDefaultThumbnailSize;
            }

            $sThumbName = $this->getThumbName($sFile, $iThumbSize);

            if ($sThumbName) {
                return $this->getMediaUrl('thumbs/' . $sThumbName);
            }
        } else {
            return $this->getMediaUrl('thumbs/');
        }

        return false;
    }
780220
public function Image($Img = FALSE) {
      if ($Img) {
         if (!is_array($Img))
            $Img = array($Img);

         $CurrentImages = $this->Data('_Images');
         if (!is_array($CurrentImages))
            $this->SetData('_Images', $Img);
         else {
            $Images = array_unique(array_merge($CurrentImages, $Img));
            $this->SetData('_Images', $Images);
         }
      }
      $Images = $this->Data('_Images');
      return is_array($Images) ? $Images : array();
   }
610308
public static function getFile($fullPath)
    {
        $fileKey = new FileKey($fullPath);

        return new File(
            $fileKey,
            static::getDirectory($fileKey->getDir())
        );
    }
1033549
public function getFullUrl()
    {
        if ($this->_fullUrl === null) {
            $this->_fullUrl = $this->createFullUrl($this->getUrl());
        }
        return $this->_fullUrl;
    }
711218
protected function img() {
		foreach ($this->localStatic[ __FUNCTION__ ] as $imgDir) {
			//if(is_file($imgDir . DIRECTORY_SEPARATOR . 'Thumbs.db'))
			//	unlink($imgDir . DIRECTORY_SEPARATOR . 'Thumbs.db');
			/*
			  $this->start('Optimizing '. $imgDir)
			  ->runLocal([
			  self::IMGMIN,
			  '-o', 7,
			  $imgDir,// . DIRECTORY_SEPARATOR. '*',
			  $this->localStatic . 'img'
			  ])->finish();
			 */
			foreach (self::rglob($imgDir . DIRECTORY_SEPARATOR . '*.{jpg,jpeg,png,gif,svg,bmp}', GLOB_BRACE) as $image) {
				$output = $this->tmp[ __FUNCTION__ ] . substr($image, strlen($imgDir) + 1);
				self::readyDir($output);


				if ($this->compress)
					$this->start('Optimizing ' . $image)
							->runLocal(['imagemin',
								//'-o', 7,
								$image,
								'>',
								$output
							])->finish();
				else
					copy($image, $output); // symlink
			}
		}
		
		return $this;
	}
321846
function fetchImageURL()
    {

        $imageNode =  $this->attribute( 'image_node' );
        if ( !$imageNode )
            return false;

        $imageObject =  $imageNode->attribute( 'object' );
        if ( !$imageObject )
            return false;

        $dataMap =  $imageObject->attribute( 'data_map' );
        if ( !$dataMap )
            return false;

        $imageAttribute =  $dataMap['image'];
        if ( !$imageAttribute )
            return false;

        $imageHandler =  $imageAttribute->attribute( 'content' );
        if ( !$imageHandler )
            return false;

        $imageAlias =  $imageHandler->imageAlias( 'rss' );
        if( !$imageAlias )
            return false;

        $url = eZSys::hostname() . eZSys::wwwDir() .'/'. $imageAlias['url'];
        $url = preg_replace( "#^(//)#", "/", $url );

        return 'http://'.$url;
    }
95948
public static function get_timber_image( $timber_image ) {
		if ( is_numeric( $timber_image ) ) {
			$timber_image = new Timber\Image( $timber_image );

		// Convert an ACF image array into a Timber image
		} elseif ( is_array( $timber_image ) && isset( $timber_image['ID'] ) ) {
			$timber_image = new Timber\Image( $timber_image['ID'] );
		}

		// Check if non-empty TimberImage was found before returning it
		if ( ! $timber_image instanceof Timber\Image
			|| ! isset( $timber_image->post_type )
			|| 'attachment' !== $timber_image->post_type
		) {
			return false;
		}

		return $timber_image;
	}