Related Articles. Impressive animated websites. A simple tool to create emails and newsletters. Learn More. Create an animated website in minutes. A perfect tool to create Bootstrap website. Adobe Illustrator 28 articles. Adobe Photoshop 13 articles. Bootstrap 32 articles. CSS3 47 articles. HTML 21 articles. Sketch App 5 articles. SVG 4 articles. App Design 23 articles. Email Design 78 articles. Responsive Design 18 articles. UX Design 91 articles. Website Design 83 articles.
Apps Examples 24 articles. Icons Examples 9 articles. Interviews 18 articles. Websites Examples articles. Fonts 24 articles. Graphics 19 articles. Icons 7 articles. Scripts 17 articles. Templates 9 articles. Tools 85 articles. Icons 10 articles. UI Kits 11 articles.
Plugins 4 articles. Themes 16 articles. Tutorials 22 articles. Cart Log In Try Free. Log In. Products Get started with the most advanced email builder for your next campaign or newsletter. A perfect tool to create website or prototype projects.
It will fit all kinds of projects. Create an amazing static website in minutes and export ready-to-use template. All Jobs Post a Job. So how do you take advantage of pixel-dense displays with WordPress? When you upload an image to WordPress, you are also able to select the size it displays.
This size refers to the viewport size, not the resolution, so upload files at twice the resolution in which they are displayed. If this sounds confusing, an example will hopefully simplify the concept. To do the same on your website, consider the size you use for your images, and double the height and width in the images you upload.
If you want to be really aggressive in supporting high-DPI devices, you could even triple or quadruple the resolution, but also consider that increasing the image size also increases the time it takes the images to load, and image size can be a major factor in slow page loading. We consider pixel-doubling to be a sufficient balance of image clarity and page speed, but you might draw a different conclusion for your site, depending on the number and size of the images you use.
Latest Post Redirect allows you to use a shortcode to redirect a post or page to your latest blog post. Use it to keep an link to your latest work that automatically updates when you create new content. Was this tip helpful? Subscribe to receive more! Sorry, your blog cannot share posts by email.
Is it possible somehow to intercept and change the src of the image before the original src is loaded? In the future, you might be able to use the picture element. In the meantime, the only approach I've seen that might work is to:. This is the approach used by the picturefill library. The concern over bandwidth is largely a mobile platforming issue. Considering that most modern mobile platforms now adopt high pixel density displays, the demand for high res images from these devices is going to be pretty high.
Should be pretty simple to drop in. If you do something with window. Stack Overflow for Teams — Start collaborating and sharing organizational knowledge. Create a free Team Why Teams? Collectives on Stack Overflow. Learn more. Optimizing website images for Retina display Ask Question. Asked 8 years, 2 months ago. Modified 8 years, 1 month ago. Viewed 1k times. I've been trying to find a good approach to solve a very commmon problem in the retina era.
Lets say the following is given: Create a website with responsive images No CSS background images Websites basic functionality must be working without JS The websites images must be optimized for retina displays. Not very bandwidth friendly : Is it possible somehow to intercept and change the src of the image before the original src is loaded?
Or do any of you have another approach in solving the problem? Improve this question. Qantas 94 Heavy Add a comment. Sorted by: Reset to default. Highest score default Date modified newest first Date created oldest first. In the meantime, the only approach I've seen that might work is to: Put a div or span where you want the image. I recommend creating your own small set of custom icons using online tools such as Fontello or IcoMoon.
Retina has four times more pixels than standard screens. However, the high-resolution file size may not necessarily be four times larger. Every image is different but if it contains solid blocks of color or details which can be omitted, it may be practical to use a x image and scale it in the browser. Be pragmatic: if the standard image is Kb and the high-resolution version is Kb, there is negligible benefit using image replacement techniques.
Use the better version throughout. There will be times when high-resolution versions of your image are four times larger — or more. In those circumstances you may want to consider image replacement techniques, i.
The following media query code could be used:. Remember that many of these users will be using smartphones or tablets on slower mobile networks. Detecting the connection speed would be more beneficial than determining the pixel density.
While it only adds 4Kb weight, high-density display devices will download images twice — although the second time will occur as a background process after the page has loaded. My advice: be practical and keep it simple. Of course, none of that matters when your boss receives his new iPad and starts to complain about image quality…. Comments on this article are closed.
Please note the background-size image property. This can be done through a class if you want to target only specific images or if you want to apply it to all images just use the img tag. With the help of jQuery, you can pin point images and half their widths and heights. Another way to do this is to interchange images based on whether the device being used to view the site is a Retina equipped device or not.
The way this works is that you have two sets of images, the regular image and one that is twice its size. You then use media queries to pin point that if this is a Retina Display device, use the bigger image. Unlike raster images, SVG, or just vectors, have a great advantage for Retina Displays which is that they can scale up, down and sideways and still look good.
The way vectors are constructed is through geometrical primitives such as lines, points, shapes, or curves which are just mathematical expression and this is what gives them the ability to scale without being distorted and looking blurry. Being a SVG, the image will adapt to any pixel density therefore there is nothing you have to do to it — simply insert the image into the HTML mock up with the size you want it to be and it will adapt and adjust itself to the resolution it needs to be.
That is it. And this is precisely the reason you would want to use vector over raster images if you can. As you can see Retina Displays can be a nightmare to support; however, I do hope you chose to support it as high DPI displays are beautiful to look at and supporting Retina allows for a much better experience for the people who use these devices. I understand that not every image can be a SVG and have the easy way out, such as photos, which is why I went over raster images thoroughly.
Additionally, these are not the only ways to go about Retina Displays this is just the two biggest ways of doing so. Sign up to get fresh stuff in your email monthly. For those who want to keep in touch with web design and development trends and tools. We create beautiful website and email builders, helping 30, customers to grow their business.
We have everything you need to make money. Made by Designmodo. This website design and code was built using our tools. Treat it as a proof of concept. Subscribe now to receive discounts, news, and updates. We pinky swear to not spam you.
Related Articles. A simple tool to create emails and newsletters. Learn More. Create an animated website in minutes. A perfect tool to create Bootstrap website. Adobe Illustrator 28 articles. Adobe Photoshop 13 articles. Bootstrap 32 articles. CSS3 47 articles. HTML 21 articles. Sketch App 5 articles. SVG 4 articles. App Design 23 articles. Email Design 78 articles. Responsive Design 18 articles. UX Design 91 articles. Qantas 94 Heavy Add a comment.
Sorted by: Reset to default. Highest score default Date modified newest first Date created oldest first. In the meantime, the only approach I've seen that might work is to: Put a div or span where you want the image. Style it to have the dimensions and layout of the image.
Add some kind of identifying mark to it so you can find it e. Improve this answer. Quentin Quentin k gold badges silver badges bronze badges. This will probably be flame-bait, but here's my two cents: The concern over bandwidth is largely a mobile platforming issue. I think Quentin essentially answered your question. This is quite rough, but you get my drift. Papa Papa 1, 1 1 gold badge 11 11 silver badges 16 16 bronze badges.
How does this stop the original src of the image being loaded? But the site wont work without JS for normal users, which was one of the requirements listed? Then you going with my original answer is better cause it has a fallback.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. The robots are coming for the boring parts of your job. Episode How a college extra-credit project became PHP3, still the Featured on Meta.
Question Close Reasons project - Introduction and Feedback. Overhauling our community's closure reasons and guidance. Related Hot Network Questions. Question feed.
This is what's considered “1x”. To accommodate high resolution/retina displays, you'll want to use an image that's pixels wide, which is. Tips for Perfect Image Optimization in · The Right Format Matters · Go for Image Compression · Never Skip the CDN · Set-up Browser Caching. Why should I optimize my images for Retina-class displays? Increasing pixel density affects the quality of images and results in a fuzzy.