Comments on: HTML5 adaptive images: end of round one https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/ helping you implement HTML5 today Wed, 29 Jun 2016 01:58:29 +0000 hourly 1 By: Alejandro Teixeira Muñoz https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-38724 Thu, 31 Oct 2013 04:03:01 +0000 http://html5doctor.com/?p=4645#comment-38724 Hi all;

My problem with resizing images is very big. I´m developing a museums network, that involves the presentation of online media to the final user. My idea, refering to the imageset, i think is much easier.

Why not user a different kind of attributes??

and the the broser will just choose between the files with names:

Standar:
xxxxx.jpg

Standar Density
xxxxx_640w1x.jpg
xxxxx_480w1x.jpg
xxxxx_800w1x.jpg
xxxxx_10241x.jpg

Double Density:
xxxxx_640w2x.jpg
xxxxx_480w2x.jpg
xxxxx_800w2x.jpg
xxxxx_10242x.jpg

The only think is just choose one of ( “vieport” or “container”) and add the density option. This combination will guive all the options.
Also, is very easy to configure our backservers to produce this names on pìctures. And .. maybe.. why not make src of <img dinamyc….

for example…

This is also another idea.. but it´s not standar HTML at ALL :P

Regards!!

**PD I´ll post soon my system for rendering images adapted to size of container without restrictions on size, and with images presentation!! Hope it will help someone!

]]>
By: Som https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-37480 Thu, 22 Aug 2013 02:37:43 +0000 http://html5doctor.com/?p=4645#comment-37480 I assume this discussion has been well and truly superseded (a year and forever on), but as I’ve come across it I feel I should weigh in.

I invariably run into this issue on a site-ly basis. What is currently the ideal solution for varying screen densities and resolutions?

I’ve tried various server-side, JS, and CSS trickery, and you could argue until the cows come home about the efficacy of each.

Ultimately, the simplest and most effective solution I have come across (and the one I use today) is a single, specially prepared source image inside an tag with a defined @height and @width.

Increasing the size of an image 100% (using nearest neighbour) and saving out an optimised JPG at 20% quality yields surprisingly good results on retina screens.

The tag is identical, ie. so semantically everything is good. The only obvious drawback is that the content isn’t necessarily “as-specified”, meaning it will show up in image searches, etc. looking pretty weird. Of course there’s another million solutions for this, but a natural resolution attribute would probably suffice.

Here’s a fiddle: http://jsfiddle.net/NBLDh/

]]>
By: Dario D. Müller https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-37423 Thu, 15 Aug 2013 09:07:23 +0000 http://html5doctor.com/?p=4645#comment-37423 Hey guys,
I have build a image-rendering software called “Customize-Images”. It can render custom image-sizes for Responsive Webdesign. With just a change of the imagename, the script creates a thumbnail-size, medium-size, portrait- or landscape-view of a choosen image. I’m happy if someone would give some feedback.
It’s hosted on GitHub: https://github.com/DarioDomiDE/Customize-Images

]]>
By: Harald Engels https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-36518 Tue, 16 Jul 2013 20:35:20 +0000 http://html5doctor.com/?p=4645#comment-36518 Here an alternative solution for adaptive images: http://litesite.org/holygrail/stage2/

]]>
By: Fernando Jr https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-36436 Mon, 15 Jul 2013 18:30:41 +0000 http://html5doctor.com/?p=4645#comment-36436 SelenIT

Your comment was what helped me most in my research. So that the browser does not download the image twice, as Bruce said, I started without the attribute img src parameter to the property and as a media query I wrote the source parameter, downloading the image only once. Possessed 03 images in the img folder.

==============================================

Following HTML:

Test_Pag

==============================================

Following CSS:

@media screen and (max-width: 599px) {

#imgResponsive {
content: url(img/small.jpg);
}

}

@media screen and (min-width: 600px) and (max-width: 991px) {

#imgResponsive {
content: url(img/middle.jpg);
}

}

@media screen and (min-width: 992px) {

#imgResponsive {
content: url(img/big.jpg);
}

}

=============================================

I am Brazilian and I follow the discussions here on the site, are all to be congratulated.

hugs,

Fernando Jr.

]]>
By: Bruce Lawson https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-32618 Tue, 26 Mar 2013 13:41:16 +0000 http://html5doctor.com/?p=4645#comment-32618 Joseph – background images are solved: http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html and image() for different formats – see http://www.brucelawson.co.uk/2013/save-bandwidth-webp-with-fallback/

Not every HTML page has a server with which to communicate or negotiate – ebooks, for example. Or HTML-based help systems.

]]>
By: Joseph https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-32615 Tue, 26 Mar 2013 13:22:58 +0000 http://html5doctor.com/?p=4645#comment-32615 Sorry, forgot to add: Would it be such a difficult thing to do or be a big security risk if UAs would expose the device’s pixel-density to the server?

]]>
By: Joseph https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-32614 Tue, 26 Mar 2013 13:20:07 +0000 http://html5doctor.com/?p=4645#comment-32614 The one thing that makes me want to pull my clothes off and run around screaming “illibilly-illibilly” on the mo0r, is the unpardonable fact that we need to provide different sized images for every conceivable density.
Besides, whether we use ‘picture’ or ‘srcset’ it still does not solve the problem of background images.
I would much rather have a server-side solution that simply generates (once, when it is first requested) and serves the best resolution for the job.

]]>
By: mark erickson https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-29425 Wed, 12 Dec 2012 17:05:37 +0000 http://html5doctor.com/?p=4645#comment-29425 Oops, my image tags were removed in my post above.
* “must see” images have data-show=”required-large”
* “excludable” images have data-show=”excludable”
* lazy-load src are in data-src=”myImage.png”
–Mark

]]>
By: mark erickson https://stevefaulkner.github.io/html5doctored/html5-adaptive-images-end-of-round-one/#comment-29424 Wed, 12 Dec 2012 17:00:00 +0000 http://html5doctor.com/?p=4645#comment-29424 I’m just starting to wade into the swamp that is “imaging for mobile”, but on first look it seems this is largely a back end issue. I can’t see changing html markup syntax–and thereby affecting millions (billions?) of existing sites.

Instead, let’s program the server to deliver a “sanely” sized/resolutioned image to the device.

To do this the server would like to get 4 pieces of information (relatively accurately!):
1. Device display size
2. Device resolution
3. Current browser zoom ratio
4. Current download speed

Device size and resolution can likely be found by examining an RDF profile or a WURFL lookup. Fallback would be user-agent sniffing.

Current zoom ratio is tedious to compute across browsers, but Yonran’s Git: detect-zoom shows promise.

Current download speed is difficult! The best way is to measure it is by downloading an image and calculating the download speed. By the time we get the results calculated, the browser is probably prefetching the other images—no good! So, probably the best we can do currently is to go ahead and measure the download speed on the first page the user requests on our website and then use that measurement on the next page the user requests. As long as we are suggesting large changes like image and picture tags , let’s mandate that the current download speed be made available as a cookie in the initial http request. Possible sources for calculating the speed would be the device itself, speed sampling by the browser or even speed sampling built into javascript/jquery.

If we can’t get the info we need to send a sane image from the server, here are some fallbacks:
1. For pre-html5 browsers, assume the worst and just send all low-size, low-resolution images.
2. For html5 browsers we could stay within the current html specs and add some “data-“ attributes to our image tags. For “must see” images: . For less important images that could even be excluded on smaller mobile screens:

One final, radical thought! LET’S NOT DOWNLOAD ANY IMAGES AT ALL until the page has fully loaded. Once the page has loaded and #1-4 above are known, then let’s efficiently lazy-fetch all server-optimized images. We could put the src in .

]]>