…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. Tinypng api key download#
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |