- Affected version
- 2.3.3
Previously 
	
	
	
		
This can result in an internal server instead of failing and giving an error message to the user. Also, this can load the image twice in the same function which feels quite redundant.
				
			updateIcon had a guard statement around if imageFromFile failed, but the added isOptimized check misses that.
		PHP:
	
	$baseImage = $imageManager->imageFromFile($this->fileName);
$isOptimized = $baseImage->getType() === IMAGETYPE_WEBP;
unset($baseImage);
if ($this->width != $targetSize || $this->height != $targetSize)
{
    $image = $imageManager->imageFromFile($this->fileName);
    if (!$image)
    {
        return false;
    }This can result in an internal server instead of failing and giving an error message to the user. Also, this can load the image twice in the same function which feels quite redundant.
