Thumbnail Images are not cropped (Scaled with CSS) – How to crop them?

This topic is: Resolved

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!

This topic contains 3 replies, has 2 voices, and was last updated by  Cihankara 9 months, 1 week ago.

  • Author
    Posts
  • #14106

    Cihankara
    Member
    Post count: 11

    Hi;

    I like Sparkle theme, but the only problem is high weight of images on page load speed. Browsers download full-size image, css resize them. Even on desktop i wait about 5-10 sec for loading page. In mobile, it takes 10-20 secs.

    You can suggest : use lazy load images, cache etc. I tried, some improvements happen. But i want to get rid of loading full size image thumbnail.

    How can i solve it?

    • This topic was modified 9 months, 1 week ago by  Cihankara.
    • This topic was modified 9 months, 1 week ago by  Cihankara.
  • #14108

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #14112

    Cihankara
    Member
    Post count: 11

    Hi, when i add this code into custom-functions.php website goes to offline. something wrong with this code?

  • #14113

    Cihankara
    Member
    Post count: 11

    ok, this code resolved my problem thank you!

    add_filter( 'post_thumbnail_size', 'filter_post_thumbnail_size_jan132016');
    function filter_post_thumbnail_size_jan132016( $size ){
    	if( !in_the_loop() )
    		$size = 'medium';
    	return $size;
    }
    • This reply was modified 9 months, 1 week ago by  Cihankara.
    • This reply was modified 9 months, 1 week ago by  Cihankara.

You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!