

A 'lorem ipsum' for images. - charliepark
http://dummyimage.com/

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

------
ori_b
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>

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

~~~
imperator
<http://en.wikipedia.org/wiki/Utah_teapot>

~~~
pg
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>

~~~
rickmode
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.

~~~
pg
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.

<http://en.wikipedia.org/wiki/Greenspun%27s_Tenth_Rule>

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

~~~
blhack
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)

~~~
scott_s
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.

~~~
kingkool68
[http://clientsfromhell.tumblr.com/post/253757614/i-sent-
out-...](http://clientsfromhell.tumblr.com/post/253757614/i-sent-out-a-link-
to-the-beta-of-a-site-i-was)

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

------
njharman
<http://dummyimage.com/1x8000000>

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.

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

~~~
njharman
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.

~~~
kingkool68
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.

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

~~~
CamperBob
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.

~~~
ahlatimer
He is, actually. Download the source.

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

------
hedgehog
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...

~~~
kingkool68
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.

------
prewett
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?

~~~
kingkool68
See here -> <http://news.ycombinator.com/item?id=1077158>

~~~
prewett
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.

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

~~~
logicalmind
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...

------
tlrobinson
I was hoping for Lenna.

------
willcodeforfoo
How about allowing named arguments for common sizes, like IAB
([http://www.iab.net/iab_products_and_industry_services/1421/1...](http://www.iab.net/iab_products_and_industry_services/1421/1443/1452))
or common display sizes
([http://en.wikipedia.org/wiki/File:Vector_Video_Standards2.sv...](http://en.wikipedia.org/wiki/File:Vector_Video_Standards2.svg))?
So you could do, <http://dummyimage.com/skyscraper> instead of
<http://dummyimage.com/120x600>

~~~
kingkool68
Hmmm it's a thought.

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

    
    
      http://dummyimage.com/640x480+--gravity+Center+--text+%60cat+%2Fetc%2Fpasswd%60
    

might not be too fun.

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

~~~
tezza
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/>

------
joeld42
Thanks!

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.

------
x1a4
I whipped up a Ruby/Sinatra version of this.

<http://github.com/xxx/fakeimage>

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

~~~
knuckle_cake
thanks!

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.

<http://github.com/xxx/placeholder_image>

------
markkoberlein
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.

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

~~~
markkoberlein
That's a good point.

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

~~~
kingkool68
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

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

~~~
jwarzech
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.)

~~~
pmichaud
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?

------
est
<http://dummyimage.com/640x-481>

<http://dummyimage.com/640x-1e37>

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

~~~
thenduks
Probably because those are invalid image dimensions?

------
rbanffy
I would like if he clarified the license.

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

~~~
kingkool68
How about "Could not compute"

~~~
charliepark
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.

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

------
pavel_lishin
<http://dummyimage.com/64xbanana>

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

~~~
thechangelog
For what possible purpose?

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

~~~
mahmud
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.

------
Jim_Neath
I tend to use this image (NSFW):
<http://files.myopera.com/coxy/albums/106123/trex-boner.jpg>

