Image source not readable - with image.intervention packege hi
i use this packege:
http://image.intervention.io
and i cant to upload this image from URL:
this is my code:
$img = Image::make('url')->encode('jpg');
$img->save(public_path('images/upload/') .'dgf.jpg');
and its didnt work
shomeone can help me to fix that
thanks :)
What does "it didnt work" mean? Are there errors?
I think here should be coma
$img->save(public_path('images/upload') ,'dgf.jpg');
What does "it didnt work" mean?
Means it did not work. Sorry couldn't help myself.
@Cronix
the url its didnt make it like an image link
look here:
this is didnt work:
http://prntscr.com/j302bx
but this is work:
http://prntscr.com/j302qe
but i get the url from my DB and i get this like is the first image
when i copy the link to chrome and enter the url and after that copy the url its look like the second pic and its work
how i can do that work id the first pic
@rin4ik No, the 2nd argument to save() is the quality/compression of the image as a percent. http://image.intervention.io/api/save
I think it's because you aren't giving it a filename to save it as. You're just giving it a path.
try something like:
$imageName = 'myimage.dgf.jpg';
$img->save(public_path('images/upload/' . $imageName));
Please sign in or create an account to participate in this conversation.