title: How to encode jpeg/jpg to webp in laravel
body: <p>I'm working with laravel 7 and using intervention/image to store images. However, I want to encode and store images as webp, I'm using the following code but it is not encoding the image in webp rather it is storing in the original format. Can you please tell me what I'm doing wrong?</p>
  <pre><code>public function storePoster(Request $request, Tournament $tournament)
  {
      if ($request-&gt;hasFile('poster')) {
          $tournament-&gt;update([
              'poster' =&gt; $request-&gt;poster-&gt;store('images', ['disk' =&gt; 'public_uploads']),
          ]);
          $image = Image::make(public_path('uploads/' . $tournament-&gt;poster))-&gt;encode('webp', 90)-&gt;resize(200, 250);
          $image-&gt;save();
      }
  }
  </code></pre>