title: Retrieve images with Intervention Laravel REST API
body: <p>I have an object that has an attribute which stores the path to an image that resides in the public folder from my laravel project</p>
  
  <pre><code>if ($request-&gt;get('poster_url')) {
  
          $image = $request-&gt;get('poster_url');
          $filename = time() . '.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];
          Image::make($request-&gt;get('poster_url'))-&gt;resize(300, 300)-&gt;save(public_path('uploads/concert_pictures/') . $filename);
          $concert-&gt;poster_url = $filename;
      }
  </code></pre>
  
  <p>I would like to know how should i send it back when making a get request for a list of objects that needs to contain the image. Below is a snippet of my current query which will return the objects. The response is a json response that will be used in my frontend client. </p>
  
  <pre><code>  if (isset($queryParams['search'])) {
          $searchParams = $queryParams['search'];
          $limit = 10;
          $bands = Band::with('genre', 'country')
              -&gt;where('name', 'LIKE', "%{$searchParams}%")
              -&gt;orderBy('created_at', 'desc')
              -&gt;paginate($limit);
  
      } else {
          $bands = Band::with('genre', 'country')
              -&gt;orderBy('created_at', 'desc')
              -&gt;paginate($limit);
      }
  </code></pre>
  
  <p>Angular template </p>
  
  <pre><code>&lt;ng-container *ngFor="let band of bands"&gt;
                  &lt;div class="col-sm-6 margin-bottom-20" (click)="navigateToBand(band.id)"&gt;
                      &lt;div class="card-group"&gt;
                          &lt;div class="card card-shadow"&gt;
                              &lt;img class="card-img-top"
                                   src="{{band.image_url}}"
                                   alt="Card image cap"&gt;
                              &lt;div class="card-img-overlay"&gt;
                                  &lt;h5 class="card-title float-right"&gt;{{band.country.name}}&lt;/h5&gt;
  
                                  &lt;ng-container *ngFor="let genre of band.genre; let i = index"&gt;
                                      &lt;p class="card-text" *ngIf="i&lt;3"&gt;{{genre.type}}&lt;/p&gt;
                                  &lt;/ng-container&gt;
                              &lt;/div&gt;
                              &lt;div class="card-body"&gt;
                                  &lt;h5 class="card-title"&gt;{{band.name}}&lt;span
                                          class="float-right"&gt;{{band.price + 'dkk'}}&lt;/span&gt;&lt;/h5&gt;
                                  &lt;p class="card-text"&gt;{{band.short_description | slice: 0:80 }} ...&lt;/p&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/ng-container&gt;
  </code></pre>