How to get file size from URL in Laravel 5?

We sometimes require to get file size from path in laravel, so if you need to get file size from url then no worry and you can get using File facade. File facade provide several function that way we can get size of file or image.

In bellow example i just give you path of my images folder inside public folder and one image, that give path as argument of size function:


{{ File::size(public_path('images/1461177230.jpg')) }}

Leave a Reply

Your email address will not be published. Required fields are marked *