Articles of compression

How to set the jpg image compression for specific thumbnail sizes?

This question was asked on Set JPEG compression for specific custom image sizes and answered very nicely by Ahmad M I’d of course comment to that thread but I don’t have 50 point reputation… The code I’m using is pretty much the same as in Ahmed’s answer, but the problem I’m still facing is if […]

How do I edit the htaccess file to optimize my website?

Hi I have tried to optimize my website energyshop.se for a cpl of days but I cant seem to get it done. This is how my .htaccess looks like: Header unset ETag FileETag None # Hantera och redirecta användare till en gemensam error-sia ErrorDocument 404 /psych/cgi-bin/error/error?404 # BEGIN Compress text files <ifModule mod_deflate.c> <filesMatch “\.(css|js|x?html?|php)$”> […]

How to Compress PHP output in my plugin?

I never really dug into the compression options I have for my plugins and themes, so here I am. I was reading a few articles about PHP compression like this one and I had a question. Is it really as easy as adding the following code in the appropriate spot? <?php if (substr_count($_SERVER[‘HTTP_ACCEPT_ENCODING’], ‘gzip’)) ob_start(“ob_gzhandler”); […]

WordPress DB: options-table –> 32 gzipcompression?

I just wondered what this row in the WordPress Database refers to? 32 gzipcompression 0 I stumbled upon it in the WP options table. What if I set the value to 1. I do already have gzipcompression enabled via htaccess, so I simply wondered what this is? Thank you for your answer.

Add Additional File Info (jpeg compression & file size) settings to Edit Images Screen

On the WordPress Edit Image Screen, I’d like to add a label to show the current compression level and byte file size of the image. Any ideas how to tap into this screen and echo this data? The current settings show: Date URL File name File type Dimensions I’d like to ad File Size File […]

Minify HTML, CSS, JS with PHPWee?

I want to use PHPWee to minify my site HTML, CSS and JS. Below is the code that I modified it from here: class WP_HTML_Compression { // Settings protected $compress_css = true; protected $compress_js = true; protected $info_comment = true; protected $remove_comments = true; // Variables protected $html; public function __construct($html) { if (!empty($html)) { […]

Compress WordPress core files ( JS and CSS )

I checked WordPress core files, and I found a lot of uncompressed JS and CSS files. Is there any disadvantage, if I compress these files using YUI-Compressor? Secondary question: Why didn’t compress these files Thanks!

Page output in strange characters

Apparently a lot of people complain that they only see random letters and characters: My biggest problem is that I can’t reproduce the problem on ANY of my devices! Not on my Windows XP laptop, not on my Windows 7 laptop, not on my Android phone or my iPod Touch. It doesn’t matter which browser […]

Setting JPEG compression for custom image sizes doesn't work in specific cases

I have a custom image size hello-image: add_image_size( ‘hello-image’, 700, 300, true ); Whenever an image is uploaded, I compress the cropped hello-image sized image to 40% JPEG compression. It works great in all cases except… The problem If the width of the original image is greater than 700px it works just fine. But if […]

Set JPEG compression for specific custom image sizes

I use various custom image sizes (by add_image_size) and I have set my JPEG compression to 30% with this filter: function jpeg_quality_callback($arg) { return (int)30; } add_filter(‘jpeg_quality’, ‘jpeg_quality_callback’); If I am not mistaken, the above code compresses all of my custom image sizes with 30%. Now, for two of my custom image sizes named splash1 […]