Blurry images when using add_image_size with crop

I've got the following image size: add_image_size( 'medium-thumb', 350, 350, true ); The images generated using the code snippet above are heavily compressed and turn blurry. This is the original image: This is the 350x350 image generated by WordPress. Check the flowers and the side of the planter in the top left corner: I have also added the following snippet to my functions.php but that doesn't seem to have made any difference add_filter('jpeg_quality', function($arg){return 100;}); Anyone has got a suggestion? …
Category: Web

Wordpress built-in compression of images? How well does it compare to Photoshop or Shortpixel?

I think the quiestion is pretty straight forward. I have around 5000 images I want to upload. I need to compress them somehow, but how?! Photoshop compression or use the built-in compression of new wordpress versions. Like does Photoshop do anything better? Because the only thing I can see in Photoshop is basically the % of compression for jpg. It also offers a preview of the image but I don't really care nor need that for these types of images. …
Category: Web

Gzip compression or Mod_deflate not working

Our wordpress website we need to enable gzip compression we followed below instruction to enabled. we have wp rocket plugin this plugin automatically added compression mode_deflate lines in .htaccess We try to enable from server side so we followed this below article instruction to enable gzip compression (https://devops.ionos.com/tutorials/how-to-configure-mod_deflate-for-apache-on-centos-7/) In this article given edit file sudo nano /etc/httpd/conf.d/mod_deflate.conf and paste the below code <filesMatch ".(js|html|txt)$"> SetOutputFilter DEFLATE DeflateCompressionLevel 7 DeflateMemLevel 8 DeflateWindowSize 10 we try to do this step we can't …
Category: Web

Restrict media upload size by format

I'm looking for a way to restrict the size of the media when uploading (a plugin or just a function). So I found this: function increase_upload_size_limit( $limit ) { return 524288; } add_filter( 'upload_size_limit', 'increase_upload_size_limit' ); And it's working, but the thing is that i'd like to choose a different size restriction for a pdf than for a jpeg. The thing that would really be perfect is to be able to choose the max size per format. And when uploading …
Category: Web

Custom Plugin - Package and Deployment Solutions

We are a very small company working with a specific customer base. In this, we often have to create small WP plugins specific to the customer. Typically, we re-use our own basic folder structure and files (base php file that lays out some standard variables, assets folder structure for css and js files, installation/settings features templates, etc.). We don't currently use anything that is "industry standard" or that will package, process, combine or minify our files for deployment (css, scss, …
Category: Web

Having an issue in compressing Images in wordpress site

I am having a trouble in getting my images to be compressed. Can images be automatically compressed? Is there any other solution for images compressing because its increasing my technology rental website loading time and please help me out in finding the solution to overcome this images compression issue
Category: Web

Advice on image heavy site, compression and slow page loads

I have a videogame fansite. By its nature it's image intensive. No matter how I capture the images, process them, run them through compression plugins like Smush or standalone software, I cannot reduce them enough so they don't drag my page load times into the dirt. At least not without the images looking like crap. I'm using Siteground web hosting platform. I need advice on how to compress my images more without losing too much quality. If possible. My most …
Category: Web

strange characters in wordpress website displayed for visitors

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 I'm using. The only time I see the problem myself is when I try to share one of my blog posts on Google+, because the …
Category: Web

Disable all resizing and compression

How do you successfully disable all image compression and resizing? I would like Wordpress to use the image exactly as it is uploaded. same pixel dimentions, same quality. I have gone down the route of adding to functions.php multiple strings that change the thresholds and the quality like... add_filter( 'jpeg_quality', function() { return 100; } ); No joy. There are multiple threads on this topic across the net, lots of similar suggestions, none of them work/work with the recent Wordpress …
Category: Web

Enable compression

I am trying to make Enable compression 100% for my website speed optimization but I can not get the result. I tried plugins: Autoptimize, w3 total cache, wp rocket, clean cache, and others. The web host is Bluehost. Here is the website link: https://airytravel.com/ I am new here. Hope someone can help me.
Category: Web

Enabling compression in .htaccess file is causing 500 internal error

This is the code I am adding to my .htaccess file for compression and browser caching and gzip. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wordpress/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wordpress/index.php [L] </IfModule> # END WordPress <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg …
Category: Web

Stop WordPress compressing images? – Quality is terrible

I understand WordPress creates smaller versions of the original image file. These versions are blurry in comparison to the original which is a big issue as a photographer. I set up this page you can see the difference https://www.jamieknop.com/test/ How can I stop WordPress compressing the images? I tried adding the below to the functions.php file and regenerating the thumbnails but no luck. add_filter('jpeg_quality', function($arg){return 100;}); Thanks, Jamie
Category: Web

Image Quality Thumbnail Compression in Wordpress?

I’m lost I don’t know where to turn. I am trying to get my thumbnails to NOT be compressed at all. My uploads are nice and colorful, but the thumbnails gets very visibly duller and poorer quality. I already added this code to my function.php file in my child and parent theme: add_filter(‘jpeg_quality’, function($arg){return 100;}); echo get_the_post_thumbnail($id, array(100,100) ); add_filter( ‘jpeg_quality’, create_function( ”, ‘return 100;’ ) ); add_filter( 'wp_editor_set_quality', 'wpse246186_image_quality' ); add_filter( 'jpeg_quality', 'wpse246186_image_quality' ); function wpse246186_image_quality( $quality ) { …
Category: Web

Media Gallery Upload Thumbnail Compression is Changing Image Hue

When I upload an image to my media gallery, all the image sizes that are generated are discolored. Here's an example. This is the full-size image: And now here is one of the smaller image sizes: See the difference? The blue picture on the wall is now teal green, and the whole image has a blueish hue to it. I've tried the following things. None of these worked: Regenerate Thumbnails Plugin (Overwriting them) Deleting all generated images then running Regenerate …
Category: Web

Google Page Speed Insights - Optimize Images

The top recommendation from Google Page Speed Insights is to optimize & compress images. How do I do that? It lists dozens of images and that would be practically impossible to do it all manually. Should Fix: Optimize images Properly formatting and compressing images can save many bytes of data. Optimize the following images to reduce their size by 1MiB (88% reduction).
Category: Web

Wordpress REST API json - How to activate gzip compression?

Im currently trying to activate the gzip compression on a Wordpress website. But the json output of the wordpress embed api doesn't seem to be affected by my htaccess settings. Here they are: <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype …
Category: Web

Make Wordpress compress full size image?

Regardless of size uploaded, I need Wordpress to compress the original full size image to 30% upon upload. Full size is the only image I use. I have already disabled all thumbnail creation upon upload. I have added a filter to change the compression of thumbnails to 30%. add_filter('jpeg_quality', function($arg){return 30;}); However, as you know, the original upload is not compressed but retained as the full size original. I want to compress it and either create a new thumbnail of …
Category: Web

Alternative image sizes are too large

Very new to WordPress here so still learning a lot so if anything I say here is silly then please go easy on me On a site I've created I'm using this plugin here : https://wordpress.org/plugins/simple-image-sizes/ I believe I'm hopefully correct in saying that this is basically allowing me to create smaller images from the main uploaded image in exactly the same way it would as defining the sizes in the functions.php file? I'm not one much for working without …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.