No. 021

Hoity Toity: public domain art on organic T-shirts

A shop that prints famous out-of-copyright paintings and prints on organic cotton T-shirts, made to order by Printful, with an exact preview of every shirt.

The Hoity Toity home page: a headline, example searches and Dürer's Rhinoceros on a shirt
The Hoity Toity home page: a headline, example searches and Dürer's Rhinoceros on a shirt

At 18 I bought a T-shirt in a charity shop with a Picasso sculpture on the front and loved it. Picasso is in copyright until 2044, but a great deal of famous art is not, and several large museums publish photographs of it under open licences. Hoity Toity prints those works on organic cotton T-shirts. Each shirt is made to order by Printful and posted straight to the customer.

I had started on this a few times before: a domain in 2021, a Printful account, and in 2025 a set of research reports and a prototype. None of them got further than that. This time the research, the specification and the code all went into one repository, and the build took four days.

Does it pay?

The feasibility work came first. At a £30 to £35 retail price the margin is about £10 to £15 a shirt. Running costs are small: about £105 to £370 to start, then £55 to £155 a year for hosting, the domain and compliance. That makes it a reasonable side project and not a business: replacing a salary would need about 300 orders a month. The main risk is demand. The market is crowded, and paid adverts cost more per sale than the margin.

The analysis also showed that AI-generated pictures of people wearing the shirt would use up most of the margin if every visitor could make them freely. They are cached, limited to three a day per visitor, and only made when someone asks.

The catalogue

The rights rule is simple: in the UK copyright lasts for the artist's life plus 70 years, so the artist must have died in 1955 or earlier, and the photograph must come from a source with an explicit CC0 or public domain licence. Images come from the National Gallery of Art, the Cleveland Museum of Art, the Rijksmuseum and Wikimedia Commons, about 300,000 records in all.

Nothing lists until its artist is approved. The first ingest produced 9,112 candidate artists, ranked by Wikidata sitelinks (the number of Wikipedia languages and other Wikimedia sites with a page about them). An artist is approved once their death year agrees across Wikidata and every museum that holds their work. Works are ranked the same way, so a work with its own Wikipedia articles comes before one without.

Collections such as Flowers and Plants, Sea and Ships or Japanese Prints come from keyword themes matched against titles, in English and Dutch. Search combines keyword matches with semantic image search, so a search for cats, storms at sea or skulls can find works whose titles say nothing of the kind: Gemini writes a caption and tags for each image, Workers AI turns them into embeddings, and Vectorize finds the nearest matches. The results are merged by reciprocal rank fusion, with fame as a small boost that reorders close results but never lifts a weak match over a strong one.

An exact preview

The artwork page shows the shirt as it will be printed, drawn in the browser from the artwork and a photo of a model. Two things made this harder than placing a rectangle on a photo.

Prints and drawings arrive as photographs of a whole sheet of paper, and a beige rectangle on a shirt looks wrong. The shop removes the paper and keeps only the ink. Printful prints with direct-to-garment inks, which cannot print semi-transparency (on dark shirts partly transparent pixels come out as white speckles), so the print file's alpha is binary, dithered as a halftone.

Four prints and drawings before and after the paper is removed, on white, heather grey and black shirts

The print also has to look as if it is on the fabric. The first version shaded it with shadow and highlight maps for each colour, which left a dark streak across some prints. Now each model has a light map and a warp map taken from their white-shirt photo. The print is multiplied by the light and moved up to about 8 pixels along the folds. The other 14 colours are edits of the white photo with the same folds, so one pair of maps works for all 15.

The same Turner on a teal shirt, shaded with the old maps (left) and lit from the white-shirt photo (right)

I tested the AI image models for this job first. They redraw the artwork or change its size and position, so they can't show what will actually be printed. The preview is a deterministic composite, and the AI picture is offered separately, labelled as an illustration that may differ slightly.

Stack

Next.js 16 runs on Cloudflare Workers through OpenNext. The data is in D1, images in R2, background jobs on Queues, and search uses Vectorize and Workers AI. Payments go through Stripe Checkout, orders to the Printful API, and captions and illustrations come from Gemini.

Rough edges

  • D1's CPU limit. Remote D1 resets queries that use too much CPU time. Bulk loads had to be split into small SQL files and retried when D1 reset them, sometimes on a request that ran in milliseconds on the retry. A migration that would have copied the 300,000 rights rows in one statement was redesigned so it didn't need to.
  • The query planner. Counting works per artist exceeded D1's CPU limit once the catalogue held 300,000 works. The planner had chosen to drive the count from an index on the rights table, scanning every passing work for each artist. A CROSS JOIN, which SQLite keeps in the written order, fixed the join order.
  • Stripe terms consent. A new Stripe account can't hold a terms of service URL until it is activated, and Stripe then refuses to collect terms consent at checkout. Until activation the checkout shows the terms link above the pay button instead.
  • The Met. The Metropolitan Museum's image host blocks automated downloads, so its open access collection is not in the first catalogue.

Built with AI agents

Most of the research, specification and code was written with AI coding agents. The specification includes a build contract of about 4,400 lines covering the schema, types, service interfaces, routes and tests, split into work packages that agents could build in parallel. After the build, separate review passes covered security, rights, payments and the user experience, and each produced its own set of fixes. Anything that changed during the build is recorded at the end of the contract. The git history runs from 20 to 23 November.

Some decisions stay with me: which artists to approve, and a professional check of the rights rules before launch.

Status

The shop is live at hoitytoity.uk in Stripe's test mode, so it doesn't take real payments yet. The Printful store is connected, and test orders arrive there as drafts that are never printed. Every push to the repository runs the checks in GitHub Actions and, when they pass, deploys to Cloudflare; the main branch is protected. Before taking real money I still need to move the shop to its production environment with live payments, load the full catalogue there, and place one real order.

Back to the inventory