0

Here is my code:

   $avatar->pixelate(12);

It should pixelate the picture but it shows me this:

"Method Illuminate\Http\UploadedFile::pixelate does not exist."

K.Dᴀᴠɪs
  • 9,945
  • 11
  • 33
  • 43
Jo Jo
  • 61
  • 1
  • 1
  • 6
  • the `$avatar` is as the error says, an [`UploadFile` class](https://github.com/laravel/framework/blob/5.7/src/Illuminate/Http/UploadedFile.php). It dont have `pixelate` method. are you perhaps missing [Intervention's `pixelate`](http://image.intervention.io/api/pixelate)? do post us your dependencies stated on `composer.json`. and how did you load the image into Intervention - using `Image::make` for instance. – Bagus Tesa Dec 29 '18 at 23:55

2 Answers2

1

This method does not exist in the UploadedFile class. However, it is available in the very popular Intervention Image library.

Mozammil
  • 8,520
  • 15
  • 29
0

It means Illuminate\Http\UploadedFile class does not have pixelate method. You can check laravel API to which class have which methods..

And as you can see here there is no method called pixelate

Teoman Tıngır
  • 2,766
  • 2
  • 21
  • 41