public static function storeImagesToLocalFile($imageSrcs, bool $returnAll, Configuration $config): array {
        $localImages = self::handleEntity($imageSrcs, $returnAll, $config);

        if (empty($localImages)) {
            return [];
        }

        $locallyStoredImages = [];

        foreach ($localImages as $localImage) {
            if (empty($localImage->file) || !filesize($localImage->file)) {
                continue;
            }

            $imageDetails = self::getImageDimensions($localImage->file);

            if ($imageDetails !== null) {
                $locallyStoredImages[] = new LocallyStoredImage([
                    'imgSrc' => $localImage->url,
                    'localFileName' => $localImage->file,
                    'bytes' => filesize($localImage->file),
                    'height' => $imageDetails->height,
                    'width' => $imageDetails->width,
                    'fileExtension' => self::getFileExtensionName($imageDetails),
                ]);
            }
        }

        return $locallyStoredImages;
    }