Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By Ronald Roe

Thread: Optimising Images in Internet Explorer

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    1
    Member #
    37572

    Optimising Images in Internet Explorer

    We all know that Internet Explorer is the worst browser out there, but I'm getting frustrated at the fact that all the images I'm using on my site are jagged seemingly only in Internet Explorer. In Chrome and Safari, my images display well.

    I am using PNG images and for the benefit of Retina iOS devices, I have to save all my images twice the size (that I need) and then use inline height/width HTML to scale them down. This reduces their original size by 50% but ensures they don't appear blurry on Retina devices due to double the amount of pixels in the same screen size. However, this does me no favours in Internet Explorer because the images appear blurry when they aren't their 'natural' sizes.

    So I can't optimise my images and display them as the actual size they are. Yes, this would work in Internet Explorer, but it wouldn't work for Retina devices.

    Any solutions?

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    If the images are loaded within CSS, you could use pixel-ratio media queries:
    Code:
    @media (-webkit-min-device-pixel-ratio: 2){
      /* Swap image for higher-res version */
    }
    You can use JS window.devicePixelRatio to swap images loaded via HTML. Here's a write-up on that property: devicePixelRatio - QuirksBlog
    Last edited by Ronald Roe; Oct 30th, 2013 at 08:36 AM.
    AlphaMare likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com