[Resolved] number and quality of images generated by GP

Home Forums Support [Resolved] number and quality of images generated by GP

Home Forums Support number and quality of images generated by GP

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #266206
    David

    Hi Tom,
    if i’m right it seems GP (I have the premium version) generates 9 different sizes of each uploaded image. This is a lot and I think I don’t need most of those versions. I have more than 300 images in my library and it will grow in the future.
    Is there a way to limit the number of sizes?

    Also I have the feeling those images are very compressed although I need quality more than lightness because the website is a paintings portfolio and shop. Do I have a way to setup the compression?

    I know I may use plugins for this, but i had already so many plugins installed… It could be better to change the theme settings.

    #266236
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    By default, GP doesn’t generate any additional sizes on upload.

    However, if you set the image width and height of your featured images (https://docs.generatepress.com/article/adjusting-the-featured-images/), GP will generate those sizes for each of the images you upload as featured images.

    For the quality, adding a function like this might help:

    add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );

    #267136
    David

    Thanks Tom!

    #267221
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

    #311487
    Yuri G

    How to insert this code? in functions.php
    I inserted code at the end of the file.

    so right?

    }
    
    // No compression jpeg images when uploading
    add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );
    }
    endif;

    But the image is not better…
    How to set image upload no compression?

    #311583
    Tom
    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.