Laravel livewire intervention images

I am trying to use Intervention image with Livewire to reduce the sizes and I am not succeeding. They can guide me or tell me if Livewire may not allow it.

I am trying to pass this methodology:

foreach ($this->imagenes as $pathGaleria) {
		     $imgUrl = $pathGaleria->store('imagenesPropiedades');

		     $img = imgPropiedades::create([
		       'url' => $imgUrl,
		       'property_id' => $this->propiedadId
		     ]);

to this other way:

foreach ($this->imagenes as $pathGaleria) {
            $imgUrl = $pathGaleria->store('imagenesPropiedades');
            Image::make($pathGaleria)->resize(1200, null, function ($constraint) {
                $constraint->aspectRatio();
            })
            ->save($imgUrl);
            $img = imgPropiedades::create([
                'url' => $imgUrl,
                'property_id' => $this->propiedadId
            ]);

        }

but the page remains blank. Thank you.

Hello,i cannot directly solve bug in your code but i had similar problem and i used below snippet to fit image into constraints. You can amend to your liking.

foreach ($this->photos as $photo) {

             $path = $photo->hashName('public/gallery');
            $image = Image::make($photo)->fit(1280, 720);
            Storage::put($path, (string)$image->encode());

            $fileNameToStore = Storage::url($path);
}