Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #790460

    Hi guys,

    can you help me with a problem I recently encountered?
    All pictures on single product pages are blurry although the picture size seems to be correct.

    It is a bit odd, because the catalogue pictures are correctly displayed. Even when I click on the single product page picture, so that it is getting larger, everything seems fine.

    Could you give me a hint to solve the problem, please?
    Thanks in advance!

    Flo

    #790467

    Hey Florian,

    Can you paste a link to a blurry photo example. Are they all blurry? The few that I clicked through seemed to display correctly.

    Best regards,
    Jordan Shannon

    #790477

    Hi Jordan,

    thanks for your quick reply. I know what you mean. Using Google Chrome, everything is displayed correctly. Using Firefox, Safari and Opera via Mac and Windows the pictures are blurry.

    If you can tell me, how to post a picture in this forum, I’ll do it immediately :).

    Best regards,
    Florian

    #790483

    Hi,

    I see the error in Firefox. Please provide the direct link to the dashboard login so I can take a further look. The info you pasted in private didn’t work and wp-admin took me to the customer login.

    Best regards,
    Jordan Shannon

    #790485

    Hi,

    below you can find the links…

    Best regards
    Flo

    #790491

    Hi,

    Apologies but the login is still not working for me.

    Best regards,
    Jordan Shannon

    #790902

    Good morning,

    I’m devastated! Those are my login credentials and for me they work perfectly fine. Is there a way to solve the pending problem via FTP?
    I’m not sure why it is not working? We are using Wordfence. Can it be, that WF is blocking your Login due to different IPs?

    Best regards
    Florian

    #790905

    Hi,

    Try adding this code at the bottom of functions.php:

    global $woocommerce;
    
    if( version_compare( $woocommerce->version, '3.0.0', ">=" ) ) {
    
    	add_theme_support( 'wc-product-gallery-zoom' );
    	add_theme_support( 'wc-product-gallery-lightbox' );
    
    	function avia_woocommerce_gallery_thumbnail_description($img, $attachment_id, $post_id, $image_class ) {
    	    return $img;
    	}
    	function avia_woocommerce_post_thumbnail_description($img, $post_id){
    	    return $img;
    	}
    
    }

    Let us know if this helps :)

    Best regards,
    Nikko

    #790931

    Hi Nikko,

    thanks for joining this conversation. I added the code at the very bottom of the functions.php (Folder: wp-includes). Unfortunately that didn’t help. It crashed the website.

    Any further suggestions?

    Best regards
    Florian

    #790937

    Hi guys,

    did you just login to our website?

    Best regards
    Flo

    #790948

    Hi,

    It should be fixed now. I have modified this file: enfold/config-woocommerce/config.php (line 1395 – 1418)

    function avia_woocommerce_post_thumbnail_description($img, $post_id)
    {
    	global $post, $woocommerce, $product;
    
    	if(has_post_thumbnail())
    	{
    		$image_title = esc_attr(get_post_field('post_content', get_post_thumbnail_id()));
    		$image_link  = wp_get_attachment_url( get_post_thumbnail_id() );
    		$image  = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(
    			'title' => $image_title
    			) );
    		$attachment_count = count( $product->get_gallery_attachment_ids() );
    
    		if ( $attachment_count > 0 ) {
    			$gallery = '[product-gallery]';
    		} else {
    			$gallery = '';
    		}
    
    		return sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s"  rel="prettyPhoto' . $gallery . '">%s</a>', $image_link, $image_title, $image);
    	}
    
    	return $img;
    }

    replaced it with:

    if( version_compare( $woocommerce->version, '3.0.0', ">=" ) ) {
    	function avia_woocommerce_post_thumbnail_description($img, $post_id){
    	return $img;
    	}
    } else {
    	function avia_woocommerce_post_thumbnail_description($img, $post_id)
    	{
    		global $post, $woocommerce, $product;
    
    		if(has_post_thumbnail())
    		{
    			$image_title = esc_attr(get_post_field('post_content', get_post_thumbnail_id()));
    			$image_link  = wp_get_attachment_url( get_post_thumbnail_id() );
    			$image  = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(
    				'title' => $image_title
    				) );
    			$attachment_count = count( $product->get_gallery_attachment_ids() );
    
    			if ( $attachment_count > 0 ) {
    				$gallery = '[product-gallery]';
    			} else {
    				$gallery = '';
    			}
    
    			return sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s"  rel="prettyPhoto' . $gallery . '">%s</a>', $image_link, $image_title, $image);
    		}
    
    		return $img;
    	}
    }

    And in the same file (line 1425 – 1438)

    function avia_woocommerce_gallery_thumbnail_description($img, $attachment_id, $post_id = "", $image_class = "" )
    {
    
    		$image_link = wp_get_attachment_url( $attachment_id );
    
    		if(!$image_link) return $img;
    
    		$image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) );
    		$image_title = esc_attr(get_post_field('post_content', $attachment_id));
    
    		$img = sprintf( '<a href="%s" class="%s" title="%s"  rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image );
    
    	return $img;
    }

    replaced it with:

    if( version_compare( $woocommerce->version, '3.0.0', ">=" ) ) {
    	function avia_woocommerce_gallery_thumbnail_description($img, $attachment_id, $post_id, $image_class ) {
    	return $img;
    	}
    } else {
    	function avia_woocommerce_gallery_thumbnail_description($img, $attachment_id, $post_id = "", $image_class = "" )
    	{
    
    			$image_link = wp_get_attachment_url( $attachment_id );
    
    			if(!$image_link) return $img;
    
    			$image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) );
    			$image_title = esc_attr(get_post_field('post_content', $attachment_id));
    
    			$img = sprintf( '<a href="%s" class="%s" title="%s"  rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image );
    
    		return $img;
    	}
    }

    Let us know if it’s good on your end :)

    As for the login access, if I just copy and paste the password it doesn’t work but if I copy and paste the password then replace the single quote by typing manually, it does let me in :)

    Best regards,
    Nikko

    #790966

    Your are the most awesome guys I’ve ever seen!
    Thank you very much!

    Best regards
    Flo

    #790982

    Hi,

    I am glad this was able to be solved for you. If you need additional help. please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Picture on single product pages blurry…’ is closed to new replies.