最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Convert all uploaded PNG files to PNG-8 format

programmeradmin3浏览0评论

Running a high trafficed platform. In my quest to minimise bandwidth costs, I added a high JPEG compression on all JPEG uploads (check solution in my previous question). However, Wordpress does not convert PNG files to JPEG, which means that all PNG files remain at their original size.

Is it possible to make all PNG uploads be converted to PNG-8 format? PNG 8-bit is limited to 256 colours which should bring down the file size quite drastically.

Running a high trafficed platform. In my quest to minimise bandwidth costs, I added a high JPEG compression on all JPEG uploads (check solution in my previous question). However, Wordpress does not convert PNG files to JPEG, which means that all PNG files remain at their original size.

Is it possible to make all PNG uploads be converted to PNG-8 format? PNG 8-bit is limited to 256 colours which should bring down the file size quite drastically.

Share Improve this question edited Apr 13, 2017 at 12:37 CommunityBot 1 asked Dec 8, 2012 at 17:55 Amanda DukeAmanda Duke 3852 silver badges14 bronze badges 2
  • 3 PNG-8 isn't always smaller than PNG24, actually. Furthermore, complex images look real bad at 256 colors (internet c.1995 kinda bad). My recommendation would be to leverage a CDN like Amazon S3 or Rackspace Cloud Files. Bandwidth is cheap and there are plugins which automatically integrate these CDNs for you. – Matthew Boynes Commented Dec 8, 2012 at 18:04
  • PNG-8 will look like a GIF, or not? If not CDN, try to hack into WP image conversion with this library: phpthumb.sourceforge – brasofilo Commented Dec 8, 2012 at 19:19
Add a comment  | 

1 Answer 1

Reset to default 1

If you are trying to optimize the images uploaded, I would try using this plugin http://wordpress/extend/plugins/wp-smushit/ I use it on my image heavy sites to upload all past and future uploaded images.

发布评论

评论列表(0)

  1. 暂无评论