Six APIs for placeholder images and profile avatars
Choose a placeholder image API for avatars, feed thumbnails, wireframes, or domain icons, with sample URLs that keep test layouts easy to reproduce.
I use placeholder image endpoints to test avatar sizes, thumbnails, and card layouts before the application has real uploads. The choice depends on whether the test needs a predictable identity, a named image size, or a realistic photograph.
DiceBear for repeatable illustrated avatars
DiceBear lets you choose a style and pass a seed. A fixed style, API version, and seed yield a repeatable avatar, which is useful when a profile image should stay recognizable across a list view and a detail page. I use a stable, non-sensitive fixture ID as the seed because the URL goes to a third-party service.
Request pattern https://api.dicebear.com/9.x/{style}/{svg|png}?seed={seed}
| Style | Typical use | Example |
|---|---|---|
| Lorelei | Illustrated portrait for a member profile | Open sample |
| Bottts | Robot illustration for a service account | Open sample |
| Avataaars | Casual flat portrait for a community | Open sample |
| Notionists | Monochrome illustration for a simpler interface | Open sample |
| Identicon | Geometric identifier badge | Open sample |
| Initials | Text initials in a compact avatar | Open sample |
A profile without a user upload can use a generated default. In this Kotlin example the user ID is an opaque test identifier. With a production user model, check what can be disclosed, or generate and store the fallback within the application.
1
2
3
4
5
6
7
data class User(
val id: java.util.UUID,
val email: String,
val nickname: String,
// Use a stable avatar for a test user without a profile image
val profileImageUrl: String = "https://api.dicebear.com/9.x/lorelei/svg?seed=$id"
)
SVG works well when the image scales across layouts. PNG is useful for consumers that need a raster format. Options such as backgroundColor=b6e3f4,c0aede and radius=50 control the background and shape.
UI Avatars and Pravatar for simpler profiles
UI Avatars turns a name into an initials badge. It supports a rounded image, custom background and text colors, and a bold text option. It can also derive an initial from Korean names. Use URL encoding for names with spaces or non-ASCII characters.
| Variant | Example |
|---|---|
| Default English initials | Open sample |
| Round with a random background | Open sample |
| Korean initial with explicit colors | Open sample |
Pravatar uses photographs of people. It is handy when I want to inspect how a circular crop handles a real portrait. A request such as https://i.pravatar.cc/250 picks a sample photo. A fixed img value, such as this request with ID 12, keeps the same image across runs. A stable image makes regressions in alignment or crop easier to spot.
Lorem Picsum for photos and thumbnails
Lorem Picsum provides photos at the dimensions in the URL. I use it for feed cards, product grid mockups, and gallery thumbnails, where a realistic image makes it easier to judge spacing.
| Request | Result |
|---|---|
| 250 × 160 | A random landscape thumbnail |
| 160 × 160 | A random square thumbnail |
| ID 237 at 250 × 160 | A specific photo, in this case a dog |
| Seed spring at 250 × 160 | A photo selected by a stable seed |
Add ?grayscale for a black-and-white image or ?blur to inspect how the card reads with a blurred image. When comparing layout screenshots, fix the ID or seed so that the next request represents a layout change instead of a different photo.
Placehold.co for wireframes
Placehold.co produces simple blocks, with dimensions displayed by default. A labeled block comes in handy when I need to reserve the right space for an ad slot, hero banner, or card image before the final crop is known.
| Variant | Example |
|---|---|
| Dimension label | 240 × 120 |
| Custom label and PNG | Main Banner |
| Dark theme colors | Card View |
Use a path in the form /{width}x{height}/{backgroundColor}/{textColor}. Background and foreground colors take hex values without #. SVG is the default, and the format can be specified for clients that require PNG, WebP, or JPG.
Get a domain icon for a link card
A link preview, partner list, or login-provider picker sometimes needs a small icon associated with a domain. Google’s favicon endpoint accepts a domain and pixel size, for example https://www.google.com/s2/favicons?domain=github.com&sz=128. Here are equivalent requests for Google, Naver, and Apple.
I use that endpoint for familiar icons in a mockup. A favicon can be low-resolution or missing even when the request asks for a larger size, so provide a default. Logo.dev is another option when the project can supply its required token. Keep domain lookups separate from any private partner records.
Pick an endpoint by the layout you need to test
| Test fixture | Endpoint | Useful property |
|---|---|---|
| Illustrated member avatar | DiceBear | Repeatable style and seed |
| Initials badge | UI Avatars | Fits a small, text-based profile |
| Photographic profile | Pravatar | Can select a stable sample |
| Feed or product thumbnail | Lorem Picsum | Custom dimensions and fixed ID or seed |
| Wireframe or banner slot | Placehold.co | Shows the expected dimensions or label |
| Domain icon | Google favicon endpoint | Accepts the public domain as a query |
For interactive mockups, it is convenient to open the URLs and compare them as you work. For screenshot tests and other repeatable checks, use a local copy of the exact fixture with an appropriate license, or generate a local placeholder so the test does not depend on a live service.