I am trying to import a resource which I persisted via imagejpeg...
$imageFileName = "tmp_image_path.jpg";
imagejpeg($thumb, $imageFileName);
$newResource = $this->resourceManager->importResource($imageFileName);
$image = new \TYPO3\Media\Domain\Model\Image($newResource);
$project->setPicture($image);
$this->projectRepository->update($project);
$resourceUri = $this->resourceManager->getPublicPersistentResourceUri($project->getPicture()->getResource());
But doing echo 'Resized: <img src="' .$resourceUri. '"/>';
Returns: image path not found
What am I doing wrong?
this imports only resource by path not with filename only. so
should be written as :
Pls try this, should work with resource path