Image Resize/Optimization

Mauer Themes Support Storyteller Image Resize/Optimization

This topic contains 4 replies, has 2 voices, and was last updated by  Paul 2 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #522

    edwardkim
    Participant

    Hi Paul,

    Hope you’re doing well; trying to figure out a few things in regards to images being resized and optimizing image sizes.

    1. I saw that when I upload one image, there are 9 different sizes in the FTP. I understand that the theme makes a few sizes and WP itself makes another resizes on it’s own, which totals 9 different files for 1 image uploaded. Is there a way to mitigate this? I mean, is there a way to reduce the number or even “turn off” the WP’s resizing? My site will probably have hundreds and hundreds of photos uploaded and multiplying that by nine seems very excessive. I’ve been using WP Smush in order to optimize, but I’m trying to cut the fat even further.

    2. I understand that the theme itself resizes the original image to a maximum of 1920 x 1920, correct? If I were to use an image resizing plug-in, the theme would take precedent and resize it to 1920 x 1920? What I’m trying to ask is that an image resizer seems to be pointless with the Storyteller theme?

    3. So I’ve run into an issue where Instagram photos (square photos) being uploaded are too big. The original square photos are around 2400 x 2400, however, when I see the pictures in a gallery via post, they are resized to 1920 x 1920 (which is still too big for my taste). Non-square photos are perfectly fine, but I’m trying to explore my options on all the square Instagram photos that I have, instead of re-sizing them prior to uploading. Would you have a recommendation on how to approach this? Is there a plug-in that you would recommend which would resize the photos post-upload? Also, there isn’t an option to select a size of the photo in the gallery, correct? I’m assuming this option was over-ridden in the theme.

    4. Also, when I’m uploading images to WordPress media, I’m constantly getting “http error,” is it because my image files are too big? I’m wondering if you have any fixes for this error message.

    As always, thank you so much for your time.

    #523

    edwardkim
    Participant

    Hi Paul,

    Following up on my questions above, can you please advise? Thank you so much!

    #524

    Paul
    Keymaster

    Hi Edward,

    You can turn off image resizing by going to the functions.php file and commenting out the declarations of add_image_size() — with double slashes. So the code starting at line 134 of the functions.php would look something like this (depending on the particular sizes you want to turn off):

    function mauer_add_image_sizes() {
    	// Most image sizes are 140% - for better sharpness.
    	// add_image_size( "mauer_thumb_1", 781, 520, TRUE ); // 2 col grid thumbs
    	// add_image_size( "mauer_thumb_2", 510, 382, TRUE ); // 3 col grid and galleries
    	// add_image_size( "mauer_thumb_3_softcropped", 680, 680, FALSE ); // masonry thumbs
    	// add_image_size( "mauer_thumb_4", 526, 526, TRUE );
    	// add_image_size( "mauer_cover_thumb", 1596, 840, TRUE );
    	// add_image_size( "mauer_grand_softcropped", 1920, 1920, FALSE );
    }

    However I strongly discourage you from doing that. The only caveat that comes with having all those images is the server space, which is more than generous nowadays. And having these images dramatically speeds up the page load. So I believe it is totally worth having these images, and so do the WP developers.

    Unfortunately WP does not detect which sizes are actually used for each pic. It generates all the sizes for every pic regardless of whether this particular size is displayed or not. But if you give it a second thought, that again does not create any disadvantages except the size of your files on the server. And at the same time serving the optimized images to the visitors is crucial for their experience.

    Switching off the sizes can also break some layouts.

    You can actually try to decrease the dimensions of each image size proportionally, the width and height are the second and the third parameter, e.g.:
    add_image_size( "mauer_thumb_1", width, height, TRUE );
    So, for instance, you could reduce both numbers by 1.5.
    If you do that, be sure to regenerate the thumbs with a plugin similar to Force Regenerate Thumbnails afterwards.

    2. I am not sure I understand your question. Can you please elaborate on that?

    3. WP does not distinguish between square and rectangular images. When you upload an image, the last of the instructions mentioned in answer 1 tells WP to crop an image to be 1920 by the bigger side. Which obviously results in 1920×1920 with square photos. What you can do is change the size by reducing the ‘mauer_grand_softcropped’ from 1920 x 1920 to your own numbers. This will affect all images you upload, not just the square ones.

    You’re right — there is not an option to select the size of pics in the galleries. There are two sizes in the galleries. One for the square thumbs and the other for the expanded view (‘mauer_grand_softcropped’).

    4. The theme does not alter any of WP functionality that is responsible for the actual uploading of the pics. Theoretically, big files could be a reason for that. However I don’t have any issues uploading 3750px (by the bigger side) files to my shared hosting. I believe you should ask your hosting company about this issue.

    If you want to bring your own vision to how the images work in your WP installation, I advise contracting an expert on Codeable.io for doing that.

    #526

    edwardkim
    Participant

    Hi Paul,

    Thank you for the detailed response; you can disregard question number 2. I will keep the image resizes per your advice, thanks again!

    Also, the theme doesn’t conflict with the new WP v.4.7, correct?

    • This reply was modified 2 years, 1 month ago by  edwardkim.
    #531

    Paul
    Keymaster

    Hi Edward,
    You are welcome!

    I’ve tested Storyteller with WP 4.7 and it is working fine.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Image Resize/Optimization’ is closed to new replies.