// Get filename and extension in order to insert thumbnail size later
$extension = pathinfo($hash, PATHINFO_EXTENSION); $fileName = pathinfo($hash, PATHINFO_FILENAME);
// Name changed? Then rename the file and set the new path
if($isNameChanged){ $mediaService = Shopware()->Container()->get(MediaServiceInterface::class);
privatefunctiongetDataOfProductImage(?array $image, Album $productAlbum): array { // Initial the data array
$imageData = []; $mediaService = Shopware()->Container()->get(MediaServiceInterface::class);