Tagged: picture, single product page
-
AuthorPosts
-
May 9, 2017 at 5:07 pm #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
May 9, 2017 at 5:20 pm #790467Hey 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 ShannonMay 9, 2017 at 5:42 pm #790477Hi 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,
FlorianMay 9, 2017 at 5:54 pm #790483Hi,
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 ShannonMay 9, 2017 at 6:02 pm #790485Hi,
below you can find the links…
Best regards
FloMay 9, 2017 at 6:08 pm #790491Hi,
Apologies but the login is still not working for me.
Best regards,
Jordan ShannonMay 10, 2017 at 8:29 am #790902Good 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
FlorianMay 10, 2017 at 8:33 am #790905Hi,
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,
NikkoMay 10, 2017 at 9:19 am #790931Hi 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
FlorianMay 10, 2017 at 9:34 am #790937Hi guys,
did you just login to our website?
Best regards
FloMay 10, 2017 at 9:51 am #790948Hi,
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,
NikkoMay 10, 2017 at 10:16 am #790966Your are the most awesome guys I’ve ever seen!
Thank you very much!Best regards
FloMay 10, 2017 at 11:06 am #790982Hi,
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 -
AuthorPosts
- The topic ‘Picture on single product pages blurry…’ is closed to new replies.