How to Get File Size from URL in Laravel?

By Hardik Savani | July 18, 2016 | Category : Laravel

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')) }}

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: