How can I copy nytimes.com slideshow images to the clipboard?

57

12

Slideshows on the New York Times website seem to have used some trickery to* cause a right-click in Firefox (and IE/Chrome) then "view image" or "copy image" to return a 1 x 1 pixel. The images also won't print.

How can I bypass this short of a screen capture? Bonus points for describing how they did it.

*It ends up that Ijgww pointed out that this is likely not trickery, that it's instead probably due to some browser limitations requiring this odd behavior, as evinced by this article's image, where copy, paste, and print function correctly. Moral of the story: never assume negative intent.

If it is a slideshow, it may not be trickery at all. Many slideshow solutions are only possible if image is in the background by css due to x-browser cropping facilities. And a 1x1 pixel is used to define crop size.

glenviewjeff

Posted 2012-09-13T14:20:28.980

Reputation: 1 472

2I would email the site, explain who I am and ask for the pictures – Canadian Luke – 2012-09-13T14:25:07.330

8@Luke This is not feasible, nor should I have to. This easily falls within fair use copyright guidelines. – glenviewjeff – 2012-09-13T14:29:35.253

4How do you offer bonus points exactly? – Dave – 2012-09-13T14:43:26.650

1@DaveRook bounty? You'll never know until you try... – glenviewjeff – 2012-09-13T15:16:59.230

@glenviewjeff Are you CERTAIN that this is fair use? I am not sure what 'fair use copyright guidelines' mean, but I just noticed that the image of the chicken dish had a photographer's name beside it, and noticed the following link http://www.nytimes.com/content/help/rights/copyright/copyright-notice.html which I am not qualified to interpret as easily or not falling within fair use guidelines. It also depends on what you intend to do with the image once you obtain it. If you don't intend to post it anywhere, then all is well.

– Ellie Kesselman – 2012-09-17T00:25:25.443

1

I did not state the purpose of copying the image; nor should I have to. There are likely infinite valid fair-use cases for copying an image to your computer clipboard or printing it. For instance; printing it out and stapling it to your child's forehead.

– glenviewjeff – 2012-09-17T00:54:16.960

Answers

82

New York Times creates a <div> element containing the stretched and transparent one-pixel image and locates the real image in the background:

<div class="centeredElement" style="background-image:url('http://graphics8.nytimes.com/images/2011/09/21/dining/20110921-ROSH-slide-CBSF/20110921-ROSH-slide-CBSF-slide.jpg');width:600px; height:400px;">
<img width="600" height="400" src="http://graphics8.nytimes.com/images/misc/pixel.gif" />
</div>

To save the image:

  1. Right-click it.
  2. Click View image Info.
  3. Select the real image (one above the one-pixel image).
  4. Click Save As....

How to print the page:

  1. Press Ctrl + P.
  2. Enter the Options tab.
  3. Check Print Background Images.
  4. Click Print.

Dennis

Posted 2012-09-13T14:20:28.980

Reputation: 42 934

4Seems silly of them to think that this kind of trickery will prevent users from taking their images. – Eliot Ball – 2012-09-13T18:40:08.200

51@EliotBall I'd be shocked if it didn't have a >95% success rate. A majority of internet users haven't been technically literate since sometime back in the 90s. – Dan is Fiddling by Firelight – 2012-09-13T19:10:46.663

11Also, there's not much benefit to making it more complex. The gap between those who're stopped by something trivial and those who're able to use their browsers adblock/webdev tools to figure out how to rip the image free either directly, or are capable asking and of following directions from someone else who can is very small. Meanwhile adding all the extra stuff to the page slows downloading and rendering, annoying eveyone. – Dan is Fiddling by Firelight – 2012-09-13T19:28:02.773

9@EliotBall If it was so obvious, then why is this question on SuperUser? Now, factor in how many people will never ever hear about SuperUser… – MattiSG – 2012-09-13T20:51:17.267

5

@DanNeely - 'Eternal September' began in 1993. ;)

– BryanH – 2012-09-13T22:00:22.560

2@DanNeely Well, how many users understand the concept of "Print Screen"? – luiscubal – 2012-09-14T13:04:58.277

@luiscubal it's Friday, please stop trying to depress me this close to the start of the weekend. – Dan is Fiddling by Firelight – 2012-09-14T13:49:08.227

49

  1. Use AdBlockPlus plugin, right click on the image and block it (select the last option 'custom... pixel.gif'). From now, after refreshing page once, you'll be able to click with right mouse button on the image and selecting 'view background image' and voila!

    This is the best option as done only once, will allow you to save images from galleries always without additional effort.

  2. With Firebug plugin under Firefox or with build in option in Chrome select 'inspect element'. Then you'll see the HTML code pointing to the img tag with src to the sneaky pixel.gif. The div containing it has the proper picture set as background. Just copy the image url from div element's style (background-image:url) and you are done.

topr

Posted 2012-09-13T14:20:28.980

Reputation: 602

I like your solution best, but I accepted @Dennis's because of the explanation. – glenviewjeff – 2012-09-13T14:38:05.677

I also wanted to explain, but in a hurry had some problem to paste the example HTML code so finally skipped it. Well, maybe next time I'll get the green 'V'. Most important my answer is helpful to you :) – topr – 2012-09-13T14:42:52.547

+1, this (using ABP) is exactly what I do as well in situations like this. – Karan – 2012-09-13T15:28:50.163

1The opera browser can block anything without a plugin. As for adblock, please use a whitelist for sites you like, they need the money from ads. – Manu – 2012-09-13T19:31:21.857

This is how an awesome person would get images – None – 2012-09-13T22:17:32.707

1@manu has Opera added built in DOM based blocking, or do you still need a plugin for anything beyond URL filters? – Dan is Fiddling by Firelight – 2012-09-14T19:00:28.010

I don't understand : Can't Opera block this one pixel image ? Can firefox block anything, dom or otherwise, without a plugin ? – Manu – 2012-09-17T08:01:19.957

17

Since you have tagged the question with firefox and you have marked as correct a method describing how to save the image, I suggest the following alternative:

  • Either:
    • Right click on page -> View Page Info.
    • Choose Tools -> Page Info from the menu bar.
  • Select Media Tab on the window that pops-up.
  • Browse to the image that you are looking for and click Save as button. Sorting the media by size usually helps you to get faster to the image you are looking for.

firefox-page-info

This method will work with NY Times slideshows. Yet, it comes most handy with:

  1. Pages which contain multiple images you want to download. You can select multiple files from the media list and save them all with one click of Save as.
  2. Pages with silly restrictions on right-clicking (e.g. IMDB slideshows). This method saves you from having to disable and then re-enable javascript.

m000

Posted 2012-09-13T14:20:28.980

Reputation: 846

4That is some tasty looking chicken. – Russell Borogove – 2012-09-14T01:34:49.373

2@RussellBorogove why do you think I wanted to print it? – glenviewjeff – 2012-09-17T04:00:43.993

15

Right click and select inspect element in Chrome. Now copy the url in the background-image field

Which gives me the actual link

http://graphics8.nytimes.com/images/2011/09/21/dining/20110921-ROSH-slide-CBSF/20110921-ROSH-slide-CBSF-slide.jpg

enter link description here

HackToHell

Posted 2012-09-13T14:20:28.980

Reputation: 6 162

This is exactly what I do. Feels like it lacks finesse, but it works and is fast and straightforward. Nice image choice too: (original) Georgian Chicken with Tamarind for the holidays! Yum! – Ellie Kesselman – 2012-09-13T18:57:50.337

6

If it is a slideshow, it may not be trickery at all. Many slideshow solutions are only possible if image is in the background by css due to x-browser cropping facilities. And 1x1 pixel is used to define crop size.

Others already answered how-to download such picture. I just wanted to shed some other light to the subject, not to collect bounty.

Cheers!

ljgww

Posted 2012-09-13T14:20:28.980

Reputation: 259

You appear to be quite correct! Funny how many of us got sucked into assuming mal-intent. Editing question and tags.

– glenviewjeff – 2012-09-14T03:02:57.243

It was javascript programmer answer (one that sneaks on what web designers do) ;) Thanks for points :) – ljgww – 2012-09-14T03:52:42.147

3

I'd just use a JavaScript bookmarklet to replace the dummy image with the real one, then you can simply save it or drag it onto your desktop.

Select and drag the code below directly onto your browser's bookmark toolbar, then click to run it on each page you want to view the image from:

javascript: var div = document.getElementsByClassName('image')[0]; var url = div.getElementsByClassName('centeredElement')[0].style.backgroundImage.replace(/^url\("|"\)$/g, ''); div.getElementsByTagName('img')[0].src = url; void(0);

This will only work on this site, and only whilst they have the HTML set as they do right now.

davestewart

Posted 2012-09-13T14:20:28.980

Reputation: 141

2

Use Chrome, right click image, do Inspect Element. Ignore the image tag and look a the background url for the div, which gives you the true image path, which you can copy, load into a fresh tab and save

Rob Cowell

Posted 2012-09-13T14:20:28.980

Reputation: 1 273

1

For example, based on your link in the question :- http://graphics8.nytimes.com/images/2011/09/21/dining/20110921-ROSH-slide-CBSF/20110921-ROSH-slide-CBSF-slide.jpg

– Rob Cowell – 2012-09-13T14:25:36.660

2

Here is a general solution that should work for any website.

Install and start Fiddler. Browse to the site with the image.

Check the captured traffic log that was captured in Fiddler and you will find all images that were downloaded to your browser.

dotnetengineer

Posted 2012-09-13T14:20:28.980

Reputation: 617

You don’t need Fiddler for that, the browsers offer that information as well (see some of the answers above). Sparrows and cannons. – Konrad Rudolph – 2012-09-13T20:11:54.783

1The Fiddler solution will work with ALL browsers, and even if the resources are loaded through flash or some other embedded object, as long as they are loaded through HTTP or HTTPS. With Fiddler, the procedure is done the same way, every time. Otherwise the procedure is slightly different based on the website, or the browser. I'm not saying this is the easiest solution, just a good universal alternative. – dotnetengineer – 2012-09-13T20:14:41.563

Your mention of Flash resources is actually a pretty good point. – Konrad Rudolph – 2012-09-13T20:46:49.307

2Adding more software should not be required, that's a large increase in complexity for what should be a simple process. Fiddler is also a tool for programmers, not general computer power users. – Jeff Atwood – 2012-09-13T20:58:04.077

@JeffAtwood: Though I agree with your statement that it would be (in many cases) an unnecessary increase in complexity, that does not negate the fact that using an intermediate proxy may be, in some circumstances, the only reasonable way to capture this content. – dotnetengineer – 2012-09-14T00:51:56.073

1

Press PrtScrn, open a paint program, paste.

If you are using Windows: to only capture the acive window: Alt + PrtScrn, if Vista or greater you can use the snipping tool to only capture a selection.

markmnl

Posted 2012-09-13T14:20:28.980

Reputation: 655

THIS is the most general solution of them all, and the reason why there will never be any in browser solution to "stealing" pictures. – UncleZeiv – 2012-09-14T08:24:15.407

1Actually this is a pain if the image spans a resolution larger than your monitor can display - still doable but it gets tedious. – Thomas – 2012-09-14T10:09:31.093

From the OP, "How can I bypass this short of a screen capture?" – glenviewjeff – 2012-09-17T04:04:13.553

apologies - I read "short" as "sort" then presumed you were talking about "[preventative] screen capture [technology]". – markmnl – 2012-09-17T06:14:02.003

1

All the images you see on your browser are stored in a cache somewhere on your hard-drive. You can use a cache-ripping tool to extract the images after the browsing session. And no need to save one-by-one. One of the tools you can use is cacheCopy. Allows you to choose the browser, choose the cache. How large (file size or resolution) images you would like to save. And also allows you to give your files a proper name.

The downside to this approach, you'll need to filter out images from target site from all other in your cache. But this can be avoided if you clear the cache before you start browsing for harvested images. Also this tool does not work in a private mode, as cache is not used there.

Disclaimer: it is a shameless plug. I'm the author of that app.

trailmax

Posted 2012-09-13T14:20:28.980

Reputation: 516

um.. for whatever purpose. Initially created for flickr grabbing – trailmax – 2012-09-14T22:50:12.270

0

In general: Chrome / Inspect Element / Resources tab / Frames / the only frame in the page / Images. There is no trickery in the world that could hide an image from this list.

chx

Posted 2012-09-13T14:20:28.980

Reputation: 3 069