title: Laravel does not show images on production server
body: <p>my production server is ubuntu Ubuntu 16.04.3 LTS and I have laravel 5.5
  In the route:</p>
  
  <blockquote>
    <p>/var/www/forumb</p>
  </blockquote>
  
  <p>my public folder is in the directory:</p>
  
  <blockquote>
    <p>/var/www/forumb/public</p>
  </blockquote>
  
  <p>users upload images and these are saved in:</p>
  
  <blockquote>
    <p>/var/www/forumb/public/uploads/images</p>
  </blockquote>
  
  <p>the images folder has 777 permissions
  in the images folder there are images that use the cover
  and these are shown normal from the views</p>
  
  <p>the problem is that the images that upload the users are not seen from the views and these are in the same folder images</p>
  
  <p>the cover images I can see directly from the browser like this:</p>
  
  <blockquote>
    <p><a href="http://forumb.com/uploads/images/banner1.jpeg" rel="nofollow noreferrer">http://forumb.com/uploads/images/banner1.jpeg</a></p>
  </blockquote>
  
  <p>the user images</p>
  
  <blockquote>
    <p><a href="http://forumb.com/uploads/images/5fa7385e1542a31ab9c34419b4d914fe81a11449.jpeg" rel="nofollow noreferrer">http://forumb.com/uploads/images/5fa7385e1542a31ab9c34419b4d914fe81a11449.jpeg</a></p>
  </blockquote>
  
  <p>but these can not be seen, laravel returns 404 error</p>
  
  <p>the only images that can be seen from the views are the ones that came up together with the framework and that are in the images folder</p>
  
  <p>all the others can not be seen until I uploaded an image from filezilla to the server but can not see either</p>
  
  <p>this only happens on the production server, on my localhost everything works normal</p>
  
  <p>this is mi code in the view</p>
  
  <pre><code>&lt;img class="card-img-top border-bot" src="{{ !is_null(user()-&gt;image) ? $profile_image : '/uploads/images/facebook-default-no-profile-pic.jpg' }}" class="img-fluid rounded mx-auto d-block" alt="{!! user()-&gt;nombre_empresa !!}"&gt;
  </code></pre>
  
  <p>this my controller</p>
  
  <pre><code>public function index()
  {
      $perPage = 6;
      $page = input('page', 1);
      $baseUrl = config('app.url') . '/news-and-events';
      $items = News::whereHas('photos')-&gt;with('photos')-&gt;active()-&gt;orderBy('active_from', 'DESC')-&gt;select('news.*')-&gt;get();
      $profile_image = profile_image();
      $total = $items-&gt;count();
  
      // paginator
      $paginator = new LengthAwarePaginator($items-&gt;forPage($page, $perPage), $items-&gt;count(),
          $perPage, $page, ['path' =&gt; $baseUrl, 'originalEntries' =&gt; $total]);
  
      // if pagination ajax
      if (request()-&gt;ajax()) {
          return response()-&gt;json(view('website.news_events.pagination')
              -&gt;with('paginator', $paginator)
              -&gt;render());
      }
  
      return $this-&gt;view('news_events.news_events')-&gt;with('paginator', $paginator)-&gt;with('profile_image', $profile_image);
  }
  </code></pre>
  
  <p>profile_image() function</p>
  
  <pre><code>function profile_image()
  {
      $image = user()-&gt;image;
      $gender = user()-&gt;gender;
      if ($image &amp;&amp; strlen($image) &gt; 5) {
          return '/uploads/images/' . $image;
      }
      else {
          return "/images/admin/$gender.png";
      }
  }
  </code></pre>
  
  <p>the images are uploaded normally but not shown</p>