How to get the size of an attachment file?

Posted by Prem Tiwari | Updated on

I have used this before in functions.php to display the file size in an easily readable format:

And then in my template:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers