0

I get an error on the 4th line of this php statement and I am unsure why? The image is in one of my files inside my laravel project. The error occurs when I try and click on a button that is an image, for reference the image obviously doesn't load on the webpage, then I get this once clicking on it:

@php $customOgTag = false; @endphp



@if(View::hasSection('og-image'))

    @php

        $data = getimagesize(app()->view->getSections()['og-image-internal']);

        if($data[0] > 600){

            $customOgTag = true;

            $customOgTagWidth = $data[0];

            $customOgTagHeight = $data[1];

        }

    @endphp

@endif

The error reads:

getimagesize(uploads/listings/1585288587880-2-800x467.jpg): failed to open stream: No such file or directory (View: /Applications/MAMP/htdocs/storzy-dev/resources/views/layouts/app.blade.php)

meewog
  • 1,690
  • 1
  • 22
  • 26
  • `php artisan cache:clear` and `php artisan config:clear` and `php artisan view:clear` then try again – STA Aug 04 '20 at 11:43
  • @STA didn't do anything bro – bizzaresubway Aug 04 '20 at 12:00
  • 2
    Does this answer your question? [PHP - Failed to open stream : No such file or directory](https://stackoverflow.com/questions/36577020/php-failed-to-open-stream-no-such-file-or-directory) – Joundill Aug 05 '20 at 22:49

0 Answers0