How to Optimize images after uploading all images to WordPress Site?

You can optimize uploaded image in wordpress by EWWW Image Optimizer. This plugin giving facility for bulk optimization. So you can compress and optimize image very easily. Also this plugin optimize images according proportion. So optimized image not losing quality. It is very best plugin for image optimization.I am currently using this plugin.

resize from small images to large

Found a solution here that is working: http://www.binarynote.com/how-to-perfectly-upscale-image-in-wordpress.html function binary_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ) { if ( !$crop ) return null; $aspect_ratio = $orig_w / $orig_h; $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); $crop_w = round($new_w / $size_ratio); $crop_h = round($new_h / $size_ratio); $s_x = floor( ($orig_w – $crop_w) / 2 … Read more

Add custom HTML to posts page

If you want to modify the main <header> output take a look at header.php. This file will be called before the other templates. If you want to modify the template that is used to display your latest blog posts, index.php would be the file of choice. Index.php is also the fallback template for any post … Read more

How to get custom image size for image uploaded in Customizer

Apparently, your mod is storing the complete path to the image as a string. That leaves you little alternative but to do a search and replace on the string: $img = get_theme_mod(‘image-1’); if (!empty ($img)) { $img = preg_replace (‘.(jpg|jpeg|png|gif)$’,’-525×350$0′); if (!file_exists($img)) $img = get_template_directory_uri().’/images/default.jpg’; } else if (!file_exists($img)) $img = get_template_directory_uri().’/images/default.jpg’; In words. Get … Read more