plugin-icon

Get Filesize Shortcode

제작자: ikaring·
"Get Filesize Shortcode" is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG ... ).
등급
5/5
버전
1.3.0
활성화된 설치 항목
200
최근 업데이트일
Jul 15, 2025
Get Filesize Shortcode

“Get Filesize Shortcode” is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG … ) with a human readable format, using the largest unit the bytes will fit into. Now added Get filesize block to display file link with file size.

사용방법

Put [filesize]http://yoursite.com/path/to/file.pdf[/filesize] anywhere in a post.

Or you can use url attr instead. [filesize url='http://yoursite.com/path/to/file.pdf']

Also you can place <?php echo do_shortcode('[filesize]http://yoursite.com/path/to/file.pdf[/filesize]'); ?> in your templates.

As to “Get filesize” block, search ‘get filesize’ in Text block category and insert it. Set file title and file url, and it generates a text link to the file with file size afterwards. You can toggle Preview/Edit by clicking Preview/Edit button in toolbar of the block.

참고

  • File must be in your server
  • With files larger than 2MB, it might return different number due to the spec of filesize function of PHP.
무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 6.8.3
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.