Image compression?

Hi!

We have an image compression issue on our site. The images look great when we upload them but when added to a post they become very low-res. Found an installed plugin called Smush (used for image compression) which I deactivated, but still the problem remains. Any ideas?

Here’s the site: https://coloramanorrkoping.se/tapetevent-februari/

Cheers,
Marcus

Hello Marcus,

Thanks for writing in! Are you referring to the featured image in your blog post? Please be aware that the featured image is a crop version of the full image especially if the image dimension is wider than the site’s maximum width that you have set in X > Theme Options > Layout and Design > Site Max Width.

Do you want to display the full image as your featured image? If that is the case, since your child theme has been set up, please add the following code in your child theme’s functions.php file:

// Full Original Featured Image
// =============================================================================

//
// Output featured image in an <a> tag on index pages and a <div> for single
// posts and pages.
//

if ( ! function_exists( 'x_featured_image' ) ) :
  function x_featured_image( $cropped = '' ) {

    $stack     = x_get_stack();
    $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false;

    if ( has_post_thumbnail() ) {

      $thumb = get_the_post_thumbnail( NULL, 'full', NULL );

      switch ( is_singular() ) {
        case true:
          printf( '<div class="entry-thumb">%s</div>', $thumb );
          break;
        case false:
          printf( '<a href="%1$s" class="entry-thumb" title="%2$s">%3$s</a>',
            esc_url( get_permalink() ),
            esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ),
            $thumb
          );
          break;
      }

    }

  }
endif;
// =============================================================================

We would love to know if this has worked for you. Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.