WordPress Image Scaling Quality

WordPress does do some compression on images when it resizes them. You can disable this very simply using the following code (or using a plugin like this one): function wpse_114909_image_quality() { return 100; } add_filter( ‘jpeg_quality’, ‘wpse_114909_image_quality’ ); I’m sure that GD & Imagemagick are not as good at resampling images as Photoshop is, so … Read more

image_resize() with blank space [closed]

First of all pay attention that image_resize() function is deprecated! Use wp_get_image_editor() instead of it. This function will return an instance of WP_Image_Editor class (or WP_Error if some issues appear during loading your image). This class has resize method which accepts three arguments: desired width, desired height and crop flag. Sample usage: $editor = wp_get_image_editor( … Read more

How to redirect homepage to actual URL?

Don’t use relative paths in WordPress, put the images in your theme directory and use the API to output correct paths. <img src=”https://wordpress.stackexchange.com/questions/119475/<?php echo get_template_directory_uri(); ?>/images/image.jpg”>

Featured Image problem with resizing

I believe you need to pass the third $crop parameter to set_post_thumbnail_size. In other words… set_post_thumbnail_size(80, 80, true); That third parameter enables a “hard-crop” mode. From the Codex: Set the default Post Thumbnail size by cropping the image (either from the sides, or from the top and bottom): Without that argument, or with it set … Read more

Create a link to full-sized image attachment?

I don’t know if TimThumb is really necessary. You could easily do that with internal WordPress functions. Add this code to your functions.php: <?php add_theme_support( ‘post-thumbnails’ ); // this enable thumbnails add_image_size( ‘preview-thumb’, 300, 185, true ); //this sets your default size ?> Use the following code instead of your code above. <div class=”main”> <div … Read more

Images are not showing after moving WordPress installation from server to localhost?

The tip in Part 2 at the site you link that reads Unzip the database you’ve downloaded and open it with text editor (Notepad++ or Dreamweaver) and use “Find and Replace” option to change “http://olddomain.com” with “http://newdomain.com” and then import it with phpmyadmin. is absolutely wrong. Running a find/replace on a database dump with a … Read more