Check whether medium image must be generated while storing the image file.

@param type $default
@return string
10937
public function isGenerateMedium( $default = null ) {

		$prop = $this->properties[ self::PROP_GENERATE_MEDIUM ];

		if( isset( $prop ) && strlen( $prop ) > 0 ) {

			return $prop;
		}

		return $default;
	}
1268166
public function image()
    {
        if ($this->relationLoaded('mediables')) {
            return $this->mediables->where('type', 'image')->first();
        }

        return $this->mediables()
            ->where('media.type', 'image')
            ->whereNull('mediables.type')
            ->first();
    }
68196
public function getMediumPath() {

		if( isset( $this->medium ) ) {

			return Yii::$app->fileManager->uploadDir . '/' . $this->medium;
		}

		return false;
	}
884335
public function getDefaultImageUrl($filter)
    {
        $config = $this->filterConfig->get($filter);

        $defaultImage = null;
        if (false === empty($config['default_image'])) {
            $defaultImage = $config['default_image'];
        } elseif (!empty($this->globalDefaultImage)) {
            $defaultImage = $this->globalDefaultImage;
        }

        return $defaultImage;
    }
375790
public function getImageType()
    {
        $this->imageType = ($this->imageType === 'jpg') ? 'jpeg' : $this->imageType;
        $this->imageType = ( in_array($this->imageType, $this->imageTypes) ) ? $this->imageType : 'png';

        return $this->imageType;
    }
345020
public function get($key, $default = null) {
        if (!$this->has($key)) {
            return $default;
        }

        return @unserialize(file_get_contents($this->baseDir . '/' . md5($key))) ?: $default;
    }
1050370
public function getMetaImageFolder()
    {
        if ($folder = $this->owner->config()->meta_image_folder) {
            return $folder;
        }
        
        return Config::inst()->get(self::class, 'default_meta_image_folder');
    }
140013
public function getFormat($type)
    {
        if (!$this->typeIsAvailable($type)) {
            return false;
        }

        if (isset($this->formats[$type])) {
            return $this->formats[$type];
        }

        if (!is_null($this->getDefaultFormat())) {
            return $this->getDefaultFormat();
        }

        return false;
    }
595316
public function getOutputType()
    {
        $type = $this->outputType;

        if (is_null($type)) {
            $type = $this->getInfo('type');
        }

        return preg_replace('~image/~', null, $this->formatType($type));
    }
110547
public function getBaseImageUrl(): string
    {
        return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
    }
339418
public function getContentTransferEncoding($default = '7bit')
    {
        static $translated = [
            'x-uue' => 'x-uuencode',
            'uue' => 'x-uuencode',
            'uuencode' => 'x-uuencode'
        ];
        $type = strtolower($this->getHeaderValue('Content-Transfer-Encoding', $default));
        if (isset($translated[$type])) {
            return $translated[$type];
        }
        return $type;
    }
111363
public function isImage()
	{
		$mime = $this->getMimeType();
		
		// The $imageMimes property contains an array of file extensions and
		// their associated MIME types. We will loop through them and look for 
		// the MIME type of the current SymfonyUploadedFile.
		foreach ($this->imageMimes as $imageMime)
		{
			if (in_array($mime, (array) $imageMime))
			{
				return true;
			}
		}

		return false;
	}
803489
public function getDefaultImageAlignment()
    {
        if ($alignment = $this->owner->ImageDefaultAlignment) {
            return $alignment;
        }
        
        if ($this->owner->hasExtension(MetaDataExtension::class)) {
            return $this->owner->getFieldFromParent('DefaultImageAlignment');
        }
    }
221442
public function getImageUrl(string $name, string $default = '') : string
    {
        $contentArea = $this->content->getImage($name);

        if ($contentArea) {
            $imagePath = PathHelper::normalize($this->config->getImageStorageBasePath());

            return rtrim($this->config->getImageBaseUrl(), '/') . '/' . ltrim(strtr($contentArea->image->getFullPath(), [$imagePath => '', '\\' => '/']), '/');
        }

        return $default;
    }
1329405
public function isImage(): bool
    {
        return is_resource($this->content) && in_array($this->contentType, [
            self::CONTENT_TYPE_IMAGE_JPEG, self::CONTENT_TYPE_IMAGE_PNG, self::CONTENT_TYPE_IMAGE_GIF,
        ]);
    }
173821
public function getCompressedExtensions( $default = null ) {

		$prop = $this->properties[ self::PROP_EXTENSION_COMPRESSED ];

		if( isset( $prop ) && strlen( $prop ) > 0 ) {

			return preg_split( "/,/", $prop );
		}

		return $default;
	}
562809
private function resolveResourceThumbnail($defaultImage)
    {
        $baseFolder = $this->getBaseFolder();
        $iconUrl = $baseFolder.DIRECTORY_SEPARATOR.'default_thumbnail.png';
        foreach ($this->getThumbnailBaseFolderPaths() as $path) {
            $imageFilePath = $path.DIRECTORY_SEPARATOR.$defaultImage;

            if (file_exists($imageFilePath) && is_readable($imageFilePath)) {
                $iconUrl = $baseFolder.DIRECTORY_SEPARATOR.$defaultImage;
                break;
            }
        }

        return $iconUrl;
    }