Hacker News new | comments | show | ask | jobs | submit login
A 'lorem ipsum' for images. (dummyimage.com)
169 points by charliepark on Jan 26, 2010 | hide | past | web | favorite | 77 comments

Shouldn't the example 640 x 480 image instead be labeled DCXL x CDLXXX?

Lenna is the lorem ipsum for images (http://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png). For a bit of history, http://en.wikipedia.org/wiki/Lenna

Not really, Lenna is more like the Utah teapot of images.

We had one in our demo store for Viaweb, a version of which still seems to exist, probably unbeknown to Yahoo: http://store.yahoo.com/acme/teapot.html

Are they still running your code? I'd curious to know more of the history of Viaweb between 1999 and now. Is the architecture still the same (CLisp backed by files)?

I'm curious from a "how good is Lisp long term" angle.

The code later got translated into C++. However, we had a template language for describing pages that was basically Common Lisp with a few macros. These templates are stored on disk as s-expressions. They couldn't change the template language because some users had created their own. So the C++ version literally had to read Lisp programs off disk and execute them. I.e. it was a Lisp interpreter.

That's what I was talking about at the time when I described it somewhere as a new world record for Greenspun's tenth rule.


That's hilarious! :-)

Our favorite was the one-way telephone, which still lives as a meme at YC. http://store.yahoo.com/acme/phone.html


(full nsfw image). Check out the strategic, crude touch up designed to keep away obscenity charges.

I'm not seeing it. Help me out?

Lenna was Playboy's Playmate of the month. In other words: She's nude. There's an alternative url:


I think he was referring to the 'crude touch up', not the image itself. I'm guessing mynameishere means the genital area is slightly blurred.

Pretty cool. I usually just use: http://jessefornear.com/images/mr-t.jpg (Dimensions be damned!)

I'm pretty partial to this one: http://newslily.com/default.jpg

(It's called default because it used to be the placeholder photo on my website for people who hadn't uploaded a profile pic. I don't know who originally took it, or how to ask them for permission to use it, so I replaced it with something else. I keep it around because it's really funny though)

I think both don't work. The point of a placeholder pic is to have something tangible there while looking at a layout. If the picture is more interesting than the layout, then people will focus on the picture. That's the motivation behind "lorem ipsum": it superficially looks like English, but it's gibberish and people won't focus on it instead of the layout.

I have a _programmer_ friend that acts like that customer...

I feel sorry for you mapleoin


Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 64000000 bytes) in /home/kingkool68/dummyimage.com/code.php on line 18

Opps... Sorry.

Curiously http://dummyimage.com/8000000x1 works

And should have option to set RGB of image.

Thank you for exploring the bounds of my shared-server memory limits.

That wasn't really my intention, (why the oops). I was trying to see how massive a a scroll bar I could make (sadly firefox does not scroll images (hmmmm, or maybe it was autoresizing it to fit on available screen). Also, being a programmer and very much into testing I naturally think of pushing bounds.

Don't worry you didn't break anything. Firefox will show scrollbars if you click on the image which will show it at actual size.

Oh yea I'm working on an option to change the background color. I was hoping to use an elegant syntax like http://dummyimage.com/300x250#ccc for a gray background. Too bad you can't capture anything after the hash tag on the server side. Any feedback on a better syntax?

The code checks to see that x is nine or fewer characters, so you can try to request up to 9999999x9 or 9x9999999.

you can trigger it with http://dummyimage.com/9000x9500 as well

Author might not want to distribute arial.ttf for reasons of copyright violation.

What can I say, I live on the edge.

He isn't distributing the font, is he? Rendered representations of fonts are explicitly permitted by US copyright law under all circumstances as far as I'm aware.

He is, actually. Download the source.

Ah, I see, I didn't realize he was including it with the source distribution. That might ruffle some feathers.

Very cool. Suggestion: If you make the background pattern of the image a 1px checkerboard (light gray on dark gray or something else not too obnoxious) then that will make it easier to spot places where an image is being rescaled in-browser. A 1px border might be useful too...

Good idea! I'm working on making an option to change the background color. Ideal syntax would be http://dummyimage.com/300x200#ccc for a gray background. Too bad the server is never sent anchor information so I've got to find a better way.

I'm a bit confused. It doesn't seem like this is very "lorem ipsum". Lorem ipsum looks like actual text, whereas, this does not look like actual image content (due to most images not being solid gray). To my mind, a better lorem ipsum image would have a variety of colors, shading, textures (which is probably why Lenna is a popular choice). This way you could see how a variety of image colors work with your design, color scheme, etc.

If this is simply for formatting placeholders while designing web pages, wouldn't <span style="width: xxx; height: yyy; background-color: grey; border: 1px solid black;"></span> be a pretty easy workaround, and a lot easier on the network bandwidth?

I'm not sure I follow your response correctly, but it seems like your response is: it's easy to switch image sizes this way. But you still have to edit the HTML, and it's not that hard to edit the width/height. Maybe I don't understand?

The more important point to my mind is that grey is definitely not lorem-ipsum. It doesn't help me evaluate anything except image size. And since it's easy to get a sized placeholder, a server to generate a URL seems not that helpful.

Hmm, I might do this with a ruby script, except pull random images from WikiCommons with the exact size specified. (And color!)

You might want to make sure they're safe for work. I would hate to pull a random image into my demo that was not appropriate...

That would be really nice. Please do.

I was hoping for Lenna.

Hmmm it's a thought.

For your safety sake I hope you're not forking a userspace imager like imagemagick.

might not be too fun.

It's perfectly safe to do that; exec() doesn't reinterpret the arguments through the shell, but passes them verbatim to the program.

Just make sure you don't use 'system()' (or the equivalent call in whatever your language is) to launch things. It was a bad idea from the start.

Nope. Turns out I'm using GD's imageCreate function -> http://php.net/manual/en/function.imagecreate.php

Cool[1]... nice single purpose app BTW.

My normal advice to you nifty niche App'ers is to look at long standing apps to see what they did right for revenue. Namely http://www.network-science.de/ascii/


[1] GD still has its own problems, but it seems like subscribing to secunia for GD would catch most, like this recent one :: http://secunia.com/advisories/38055/


Some features that would make this really useful:

- custom colors (as mentioned by others)

- an X across the image, corner to corner

- Optional text instead of the size (i.e. "lead photo", "thumb")

- a tag (or the resolution) repeated in an offset "brick" pattern across the entire image, similar color to BG

The last one probably overkill but useful for when you are doing something like scrolling window, where not all of the image is displayed.

I whipped up a Ruby/Sinatra version of this.


I love the simplicity of this, a good reminder why Ruby is so awesome.


I've now gemified it for use in Rails apps without having to hit a separate site. It emits data URIs at the moment only, so no IE love yet. I had immediate need for it.


Get it up on heroku!

That's an interesting solution but couldn't you just resize a 1px grey GIF with the width and height attributes to act as a placeholder? You could also add the dimensions to an ALT and TITLE attributes so they are displayed when you mouse over it.

And you can always include jQuery with the overlay plugin to enhance the mouse over experience. Meanwhile, you can try to render 640x480 text in custom fonts via canvas... etc.

I believe that dummyimage thing is dead simple.

Try doing that with a print designer over your shoulder debating on two image sizes.

That's a good point.

This is pretty awesome for front-end developers. Nice work.

By a front end developer, for front end developers. Let me know how I might make it better.

Planned additions include

True file format support (add .jpg and you get a real jpg etc) Right now you can add an extension but it still serves up a gif.

Easier syntax for making squares (/250 would work instead of typing /250x250)

Ability to change the background color

The next step is to generate these images as advertisements targeted at web developers.

I thought about this then I remembered I have a soul and like to better the world.

While an interesting idea I know I wouldn't use it if it was an ad. Despite the problem of my sample images trying to sell to me it would be annoying when trying to mockup a design (with images that randomly have undesired colors, patterns, etc.)

It's a solvable problem, and with the right targeting could actually be useful. How many people would discover Basalmiq for the first time via the placeholder image on their WIP site?



Warning: imagecreate() [function.imagecreate]: Invalid image dimensions in /home/kingkool68/dummyimage.com/code.php

Probably because those are invalid image dimensions?

I would like if he clarified the license.

"Too big of an image!" just bugs me stylistically. Maybe: "The dimensions input are too large!"

How about "Could not compute"

I think giving a brief explanation is useful. Maybe "Sorry! We can't generate images that large!" or something. That explains what's going on without going too deep on the max dimensions and whatnot.

"Our program can't withstand images of that magnitude!"

Computer says no

Doesn't handle negative parameters. Otherwise, it looks pretty cool

For what possible purpose?

So that people on Hacker News can't find a flaw with your program.

I just implemented a 3-layered payment processing system with infinite logging, and a double-ledger accounting system. Perfect. However, during testing, my colleague found that typing a negative number and clicking "Add Funds" deducted money from the user's balance and put a fund-transfer ticket out (unauthorized withdrawal!) And when the balance reached zero, no visible feedback or error was giving, but still the electronic fund transfer was initiated (free money!!)

That taught me to process my financial side-effects with explicit, visible, calls; the generic dispatch, and abusing behind the scene meta-object features will make you broke.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact