Okay
  Public Ticket #1168547
Problem with blurred and unsharp images
Closed

Comments

  • princemedia started the conversation

    hello,

    i have big problems with images which are sometimes unsharp and blurred. I used all the predefined sizes from your images. I think it happens because of the column calculation of the page builder or your image size calculation in code for images (min-width: 781px) 360px, calc(100vw - 30px).

    three column layout on "services page":

    ## some example from your demo - full size browser window in firefox - unsharp result:
    see image 1


    ## a little bit reduced window size in firefox - sharp result:
    see image 2


    ---------------------------------------------------------------------------------------

    another problem in responsive view:

    ## unsharp on frontpage:
    see image 3


    try in your demo:
    http://quirktools.com/screenfly/#u=https%3A//demos.qreativethemes.com/physio/&w=800&h=800&s=1

    ## sharp result on single service page:
    see image 4


    try in your demo:
    http://quirktools.com/screenfly/#u=https%3A//demos.qreativethemes.com/physio/services/physical-therapy/&w=800&h=800&s=1

    ---------------------------------------------------------------------------------------

    can you help me to optimize and fix this? that all images look great, also in responsive view?

    greetings

  •  1,710
    Barry replied

    Hi there,

    Indeed, it looks like the issue is coming from the page builder responsive column width + responsive image srcset size.

    Can you try the following steps:

    - Please navigate to Settings -> Page Builder -> Layout (horizontal tab)
    - Set the 'Mobile Width' from 991 to 780
    - Save the page

    If you have any questions, please let me know

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  • princemedia replied

    Great! Thank you for the fast support. It fixed the problem on the frontpage, but the blurred images on the page "services" are still there in the three column layout. Can you also help me to fix this? Please thank you!

  •  1,710
    Barry replied

    That's strange.. As each column is 359,58 pixels is width. The images from the featured pages are 360 pixels on a screen width that is 991 pixels or above.

    Can you navigate to the services page and press ctrl + f5, so the cache will be refreshed?

    Please let me know if that worked.

    Thank you

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  • princemedia replied

    Nothing happened! It is still the same. You can try it in your demo! You see that the images are blurred. Right?

    But take a look in the last column, these images from "Chiropractic Therapy" and are "Sport Injuries" always sharp.

    It's difference is difficult to see because of the jpg compression. So please try it in your demo.

  •  1,710
    Barry replied

    Thank you for your detailed messages, it makes it much easier for me

    I see the pictures are getting blurry sometimes when resizing the browser. The 'chiropratic therapy' and 'sport injuries' are also getting a little bit blurred sometimes but it is less noticeable probably due the contrast/color combination of the pictures.

    I tested this on a iMac and laptop with Windows OS and noticed the issue is coming from the max-width CSS attribute that is added on all img tags (better visible on a laptop without retina screen). This CSS attribute will make the images resize if the image is larger than the container/columns it's being added to, mainly for responsive purpose, so it won't overlap. So this CSS attribute is a 'must' for a dynamic content website, and can't run without this.

    I must say this too, that blurred responsive images are a common issue by resizing the browser as the correct scaled image is being served on the initial loaded screen width, and each browser have their own engine how to handle the code, easy said.

    After some investigation and test I notice that setting the 'Legacy Layout Engine' to 'Always' under Settings -> Page Builder > Layout, and uploading the featured image in a size of 851x568 (or bigger in the same proportion) will give better results.

    Here you can see the difference. Left is default image, right is 851x568px image.

    Please let me know if that did the trick.

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  •  1,710
    Barry replied

    Another way is to bypass the responsive images by recreating the featured page widget inside the 'Text Widget' and add the following code inside the textarea:

    <div class="featured-page">
        <div class="featured-page--image">
            <a href="#link-to-page">
                <img src="#link-to-image">
                <div class="featured-page--overlay">
                    <div class="overlay--center">Read More link...</div>
                </div>
            </a>
        </div>
        <div class="featured-page--content">
            <h4 class="featued-page--title">
                <a href="#link-to-page">Massage Therapy</a>
            </h4>
            <p>Intro text...</p>
            <a href="#link-to-page" class="text-link">Read More link..</a>
        </div>
    </div>

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  • princemedia replied

    Hello Barry,

    i'm close to finish the project for my client and your first solution tooks to much time. I would have to recreate all the images. This is a lot of work!

    The second solution is to complicated for my client. To much code for editing the page by my client.

    I just insert :

    @media (min-width: 1200px) { .featured-page--image { width: 360px; height: 240px; border-radius: 2px; } }


    Is this a good solution?
  •  1,710
    Barry replied

    Hi there,

    Setting a fixed width for the image container could be a solution. But if you add that CSS code to the CSS field in the customizer and than navigate to the home page you will see it mess up the 3 images from the featured page widgets there. Because the columns are a little bit smaller than on the services page.

    That's why the max-width CSS value is a 'must' for a dynamic website like a WordPress website as it will scale down the images when the container is smaller than the image width. 

    Of course there are always some solutions like changing the column width on the homepage, so the columns will have the same width as on the services page (3 columns wide). Or let the CSS skip the homepage, so it will target all the other pages:

    @media (min-width: 1200px) { body.page-template-default .featured-page--image { width: 360px; height: 240px; border-radius: 2px; } }

    Please note that using this CSS will limit the dynamic use of the Featured Page widget. For example if you add the widget in a 2 columns row, or a 4 columns row you will see it won't scale as it will overrule the default max-width CSS attribute.

    Edit: Or you can skip the featured page widget and use the Visual Editor widget to rebuild something similar. By adding a image, heading and some text within the textarea. Those 3 elements could be added with default functionalities that comes with WordPress, see screenshot

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes