

Large images can slow down your WordPress site, which can frustrate your visitors and massively hit your SEO rankings. You might be unaware of this fact, but large images can impact your page loading speed. Pictures are like additional assets that you can use for your site promotion. Images play a significant role in improving the users’ experience. But do images make your site slow? Not with one of these best image compression plugins. This file has been truncated.Images can improve the user experience of your readers.

thumbc.php image( 'screenshot-1.png' ), array( 'width' => 300 ) ) to your header.php to see if it works Read comment for basic instructions.Īs said, the function / file name is not yet set. If you are adventurous you can try out this gist until I release the plugin for real. …or get the original data (scroll example right)… $thumb = thumbCompressFunction( $page->image(), array( 'width' => 300 ) )->original() …or get the data… $thumb = thumbCompressFunction( $page->image(), array( 'width' => 300 ) ) The release will be on github, free for everyone.Įxample echo thumbCompressFunction( $page->image(), array( 'width' => 300 ) ).It will respect thumbs.filename and thumbs root folder path.No txt-files are added, just compressed thumbnails.It will return the compressed image if it exist, else it will return the original thumbnail.It will only try to compress the thumb with tinypng if the compressed image does not already exists.It uses the exact same arguments as the thumb() function.Please help me choose a function name! Give me own suggestions if you have any. The only problem left is naming the function that will replace the thumb() function. I have made a Kirby plugin that are compressing thumbnails. Open(OUTFILE,">$output") || die "\nCould not open $output OUTFILE $data Here is the code… hook('', function( $page ) readdir(DIR) If you DON’T want to overwrite the same file, change the last $input to $output instead.Download and put it in the same folder.Save it as /tinypng/tinypng.php in your plugin folder.Another great things is that Kirby now support hooks! If you need to compress more images each month it costs, but it’s at a low price ($0.009 per image).Ĭompressing images is good for loading time, better user experience and SEO.Ī good thing is that there is an Tinypng API. Each month you can compress up to 500 images free. One of the best services for compressing images is.
