Sub topic 4
Licensing and Consent
This chapter assumes you can write basic HTML and CSS and that you have worked with responsive layouts. It covers the legal and ethical checks a photo must pass before it goes on a page. A photo that looks right and loads fast can still be a liability if you have no right to use it, or if the person in it never agreed to appear.
This is general guidance, not legal advice. Rules differ by country, and a lawyer should review high-risk uses such as advertising, health, or children.
Two separate questions
Every photo raises two questions that people often merge into one.
- Licensing: Does the person who owns the copyright allow you to use this image, in this way, on this site?
- Consent: Did the people shown in the image, or the owners of the private property shown, agree to this use?
A photo can pass one and fail the other. A stock photo has a clear license, but the model release may not cover your use. A friend may happily let you post a snapshot they took, but the people in the background never agreed to anything.
Copyright basics
Copyright belongs to the creator the moment they take the photo. The photographer owns it by default, not the person who appears in it and not the person who paid for the camera. If you work for a company, your employment contract usually decides whether the company owns what you shoot.
Several myths cause most mistakes:
- "It was on Google Images, so it is free." Search results show images regardless of their license.
- "I gave credit, so it is fine." Credit does not replace permission, except where a license makes credit a condition.
- "It is only a small site." Site size does not change the rules.
- "I edited it, so it is mine." Cropping, filtering, or recoloring a photo still leaves you using someone else's work.
Common license types
Read the license for each image, even on a trusted site. The same site often hosts photos under several terms.
| License type | What it usually allows | What to check |
|---|---|---|
| Public domain or CC0 | Any use, no credit required | Confirm the dedication applies to this exact file |
| Creative Commons (CC BY) | Commercial and non-commercial use if you give credit | Credit format, and whether edits must be noted |
| Creative Commons (CC BY-SA) | Same as CC BY, but derivative works must use the same license | Cropping counts as a change, so share-alike rules may apply |
| Creative Commons (NC or ND) | NC bars commercial use. ND bars changes | ND can forbid cropping, which makes the image unusable for most layouts |
| Royalty-free stock | Repeated use after a one-time fee or subscription | Limits on print runs, resale, and use in merchandise |
| Rights-managed | Use for a defined purpose, region, and time | Expiry date, since you must remove the image afterward |
| Commissioned photo | Defined by your contract | Whether you own the copyright or only have a license |
The ND (no derivatives) restriction matters for this tutorial. Cropping and recoloring produce a modified version. If you plan to crop an image, as later chapters teach, confirm the license permits adaptation.
Model and property releases
A model release is a signed document in which a person agrees to appear in images and states how those images may be used. A property release does the same for private property, such as a distinctive building interior or artwork.
You generally need a release when:
- an identifiable person appears and the photo promotes a product, service, or company;
- the image could suggest the person endorses something;
- the photo shows a child, where a parent or guardian must sign;
- the photo shows recognizable private property or protected artwork used commercially.
Editorial use, such as illustrating a news story, is often treated more leniently than commercial use. A marketing site is commercial use. Stock sites usually mark photos with "model released" or "editorial use only". Treat "editorial use only" as a ban for marketing pages.
Sensitive contexts
Even with a release, context can cause harm. Using a stock photo of a person next to text about a medical condition, debt, or a crime can imply that this person has that condition or history. Many releases forbid such uses. Pick images that do not suggest something untrue about the people in them.
Consent for photos you take yourself
For photos of your own team, customers, or events, get written consent that covers the following:
- where the image will appear (website, social media, print);
- how long you may use it;
- how the person can withdraw consent.
In regions covered by privacy laws such as the GDPR, an identifiable face is personal data. You need a lawful basis for using it, and consent is the usual one. Consent must be freely given, so an employee who fears refusing may not count as freely consenting. Offer a real way to say no, and honor requests to remove an image.
For crowd or street photos, a person who is small, blurred, or unrecognizable carries less risk than a clear face. Rules still vary, so when in doubt, crop or blur.
Record keeping
A license you cannot prove is little help. For each image, keep a record of where it came from. A simple manifest file works well and lives next to the images in your project.
import csv
import sys
from datetime import date
REQUIRED = ["file", "source_url", "license", "credit", "release_on_file", "expires"]
def check_manifest(path):
problems = []
today = date.today().isoformat()
with open(path, newline="", encoding="utf-8") as handle:
reader = csv.DictReader(handle)
missing = [c for c in REQUIRED if c not in (reader.fieldnames or [])]
if missing:
return [f"missing columns: {', '.join(missing)}"]
for row in reader:
name = row["file"]
if not row["license"].strip():
problems.append(f"{name}: no license recorded")
if row["license"].strip().upper() in {"CC BY", "CC BY-SA"} and not row["credit"].strip():
problems.append(f"{name}: license requires credit")
if row["release_on_file"].strip().lower() == "needed":
problems.append(f"{name}: release still needed")
if row["expires"].strip() and row["expires"] < today:
problems.append(f"{name}: license expired on {row['expires']}")
return problems
if __name__ == "__main__":
issues = check_manifest(sys.argv[1])
for issue in issues:
print(issue)
sys.exit(1 if issues else 0)Run it as python check_images.py images.csv. It exits with a non-zero status when a problem exists, so you can add it to a build step. Dates must use the YYYY-MM-DD format for the expiry comparison to work.
A matching manifest looks like this:
file,source_url,license,credit,release_on_file,expires
team-800.jpg,https://example.com/photos/123,Royalty-free,,yes,
hero-wide.jpg,https://example.com/photos/456,CC BY,Photo by A. Rivera,not needed,
event-crowd.jpg,https://example.com/photos/789,Rights-managed,,needed,2026-06-30The third row fails twice: its release is outstanding, and its expiry date has passed.
Where credit goes
When a license requires attribution, place the credit near the image, not hidden on a distant page. A figure with a figcaption keeps the credit tied to the photo.
<figure>
<img
src="hero-wide.jpg"
width="1600" height="900"
alt="A baker lifting a loaf from a stone oven">
<figcaption>Photo by A. Rivera, <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></figcaption>
</figure>Credit text is separate from alt text. Alt text describes the image for people who cannot see it. The caption names the author and license.
Order of checks
Run these checks in a fixed order, so you reject unusable photos before spending time on them.
Common errors
- Trusting the platform label. Uploaders sometimes mislabel images. Trace the photo to its original source when the use is important.
- Ignoring the ND clause. Cropping with
object-fitor thepictureelement changes the displayed image. Check that the license allows it. - Losing the source. Renaming files to
img1.jpgwithout a record leaves you unable to show your rights later. - Forgetting expiry. Rights-managed and subscription licenses can end. A subscription that lapses may require you to remove images.
- Assuming consent never ends. People can withdraw consent. Keep a process for removal and know where each person's image appears.
- Overlooking background details. Check for visible logos, license plates, screens, and name badges.
Summary of habits
- Check the license for each file, including its limits on edits.
- Match the release to the actual use, and treat "editorial only" as unavailable for marketing.
- Get written consent for photos you take, with a way to withdraw.
- Record source, license, credit, and expiry in a manifest.
- Put required credit next to the image.
Exercise
You find a photo of a smiling customer on a stock site, labeled "editorial use only". You want to use it in a hero banner for your company's new subscription plan. A different image has a CC BY-ND license and looks perfect, but you need to crop it to a 16:9 banner. What should you do with each image?
Show answer
Do not use the first image. A hero banner for a subscription plan is commercial use, and "editorial use only" excludes it. Also, a smiling customer next to a product could imply an endorsement the person never gave. Do not use the second image as planned either. The ND clause bars derivative works, and cropping to 16:9 changes the image. Either ask the creator for written permission to crop, or choose an image whose license allows adaptation, such as CC BY with credit, or a royalty-free image with a release that covers commercial use.
Exercise
A manifest row reads: lobby.jpg,https://example.com/p/55,CC BY,,not needed,. Which problem will the checker script report, and how do you fix it?
Show answer
It reports "lobby.jpg: license requires credit", because CC BY needs attribution and the credit column is empty. Fix it by adding the creator's name to the credit column, for example "Photo by J. Okafor", and by displaying that credit in a figcaption next to the image on the page.