Learning intentions
- Know the properties and use cases for the WAV and MP3 audio formats
- Know the properties and use cases for the JPEG, GIF, and PNG image formats
- Understand what compression is and the difference between lossy and lossless compression
- Understand how resolution, colour depth, and sampling rate affect file size
- Know the key provisions of the Copyright, Designs and Patents Act 1988 and how it applies to web content
Success criteria
- I can compare WAV and MP3, referring to compression, quality, and file size
- I can compare JPEG, GIF, and PNG, referring to compression type, animation support, transparency support, and colour depth
- I can explain why web developers need to compress files before uploading them
- I can describe how increasing resolution or colour depth increases file size
- I can explain how copyright law applies to images, audio, and video found online
These check prior knowledge β it's fine if you're unsure.
1. A music file saved as a WAV has a much larger file size than the same song saved as an MP3. Which statement best explains why?
2. A web developer finds a perfect photograph on Google Images and wants to use it on their website. Which statement is correct?
3. A digital image is 100 Γ 100 pixels with 8-bit colour depth. A second image is 200 Γ 200 pixels with 8-bit colour depth. Compared to the first, the second image's file size is approximately:
Key vocabulary
File Formats, Compression and Copyright
Why file formats matter for web design
Every image, audio clip, and video on a website is stored as a file in a specific format. Choosing the wrong format can result in poor quality, unnecessarily large file sizes, or missing features (such as transparency or animation). Web designers must understand the properties of common file formats so they can make the right choice for each piece of media.
A key concern for web pages is loading speed. Large files take longer to download, especially on mobile connections. Compression reduces file sizes so pages load faster.
Audio formats: WAV and MP3
WAV (Waveform Audio File format) stores audio without any compression. Every detail of the sound wave is recorded, so WAV files are very high quality. The downside is file size β a 3-minute WAV file can easily be 30β50 MB. WAV is used in professional studios and recording workflows where quality is critical.
MP3 (MPEG Audio Layer 3) uses lossy compression β it removes audio data that most people cannot easily hear (e.g. very high or very low frequencies, or quiet sounds masked by louder ones). This reduces the file to a fraction of its original size β typically 3β5 MB for the same 3-minute track. The quality loss is usually undetectable in everyday listening.
For websites, MP3 is almost always the right choice: smaller files load faster and use less bandwidth. WAV is not typically used on web pages.
Image formats: JPEG, GIF, and PNG
Choosing an image format involves trade-offs between file size, colour range, animation, and transparency.
| Feature | JPEG | GIF | PNG |
|---|---|---|---|
| Compression type | Lossy | Lossless | Lossless |
| Maximum colours | 16.7 million (24-bit) | 256 (8-bit) | 16.7 million+ (24/32-bit) |
| Animation | β No | β Yes | β No |
| Transparency | β No | β Yes (1-bit only) | β Yes (full alpha) |
| Best used for | Photographs | Simple animated logos, icons | Images needing transparency (logos, diagrams) |
JPEG is best for photographs because it can represent millions of subtle colour variations. Its lossy compression works well on photographs (the quality loss is hard to see) but badly on sharp text or line drawings (blurring and artefacts appear around edges).
GIF is the only standard web format that supports animation. Its 256-colour limit makes it unsuitable for photographs, but it is ideal for simple animated icons, banners, and logos.
PNG offers the best of JPEG (full colour) and GIF (transparency) but without animation. It is the go-to format for logos, diagrams, screenshots, and any image that needs a transparent background. Its lossless compression means quality is never sacrificed.
Factors affecting file size
For both images and audio, three key factors control file size:
- Resolution (images): the number of pixels = width Γ height. Doubling both dimensions quadruples the number of pixels. A 200 Γ 200 image has 4Γ the pixels of a 100 Γ 100 image.
- Colour depth (images): each pixel uses a fixed number of bits to describe its colour. 8-bit = 256 colours (1 byte per pixel); 24-bit = ~16.7 million colours (3 bytes per pixel). Higher colour depth β larger file.
- Sampling rate (audio): higher sampling rates capture more of the sound wave per second β better quality, but more data β larger file. CD quality is 44,100 samples per second; telephone quality is around 8,000.
File size (uncompressed image) = resolution Γ colour depth Γ· 8 (to convert bits to bytes). Compression reduces this but adds encoding overhead.
Why compress files for the web?
Web pages must load quickly. A page full of uncompressed 10MB images would take far too long to download, especially on a mobile device. Compression reduces file sizes significantly:
- Lossy compression (MP3, JPEG) permanently removes data to achieve the greatest size reduction. The original cannot be recovered, but for everyday viewing and listening, the loss is acceptable.
- Lossless compression (PNG, GIF) reduces file size through clever encoding (e.g. storing repeated patterns once). The original data can be reconstructed exactly β no quality is lost.
Lossless compression keeps every detail; lossy compression discards some data to reduce file size
Copyright, Designs and Patents Act 1988
The Copyright, Designs and Patents Act 1988 is the UK law that protects creators' work. Key provisions for web designers:
- Copyright protection is automatic for eligible original works. Original text, images, music, video, software, and other qualifying works can be protected without registration or a Β© symbol.
- Creators and other rightsholders control copying and licensing. They can decide whether others may copy a work, publish it online, or use it under agreed licence terms.
- Copying without permission will usually infringe copyright unless a licence or legal exception applies. Finding an image, song, or video online does not by itself give permission to reuse it.
- The law applies to all media: text, graphics, video, audio, and software.
- Creative Commons licences allow creators to grant controlled permission. A CC licence might say "free to use with attribution" or "free for non-commercial use". Web designers should look for Creative Commons or royalty-free resources when sourcing media.
Implications for individuals and businesses. Before reusing content, both individuals and businesses should identify who owns it and check that the licence terms cover the planned use β for example, whether commercial use is allowed or attribution is required. Unauthorised use can lead to takedown demands, unexpected licensing costs, civil claims and legal costs, as well as reputational harm. Businesses may face particular disruption if material must be removed from a public website or campaign.
Lawful use is possible where the rightsholder has given permission, a suitable licence covers the intended use, copyright has expired, or a legal exception applies. Sites such as Unsplash, Pixabay, and Pexels offer images under stated licence terms; Free Music Archive and ccMixter provide licensed audio. Always read the specific terms rather than assuming that content labelled "free" can be used in any way.
Worked examples
Scenario A: A web developer wants to add background music to a website. The audio file must load quickly for visitors.
Scenario B: A recording studio is archiving an original master recording of a band and needs to preserve every detail of the audio.
Given: A web designer is building a wildlife photography site. They need to add: (a) a high-quality photograph of a lion; (b) a simple animated logo with a white background that must appear transparent; (c) the site's own logo (a simple drawing) on a transparent background, not animated.
Scenario: A pupil is building a website about their favourite sports team. They search Google Images and find a great photo. They also find a popular song they want to use as background music. Are they allowed to use these without asking?
"Describe one difference between JPEG and PNG. In your answer, refer to compression type and transparency."
Compression type: JPEG uses lossy compression, meaning some image data is permanently removed to reduce file size. PNG uses lossless compression, so the full image data is retained and no quality is lost.
Transparency: JPEG does not support transparency β any transparent area appears as a solid white (or coloured) background. PNG supports full alpha transparency, meaning pixels can be partially or fully transparent, allowing the image to be placed over any background without a visible box.
The SQA frequently asks you to justify a choice of file format. Naming the format may earn an identification mark where one is separately allocated, but cannot also earn the justification mark β use the stated mark allocation.
- Identification: "JPEG" may earn the format mark where the allocation includes one.
- Justification: "JPEG uses lossy compression to reduce the photograph's file size without a noticeable loss of quality, helping the page load quickly" earns the separate justification mark.
A copyright question may ask you to explain why an action might infringe copyright. Name the Act (Copyright, Designs and Patents Act 1988), explain that the work is protected, and state that copying will usually infringe unless permission, a suitable licence, or a legal exception applies.
Questions 1β5 are auto-checked. Questions 6β10 are self-marked β write your answer, then reveal the model answer to check your work.
1. Which image format supports animation? TYPE 1
2. A web developer wants to use a logo image on a page with a coloured background. The logo has a transparent background. Which format is the best choice if no animation is needed? TYPE 1
3. Under UK copyright law, when does an eligible original work receive copyright protection? TYPE 1
4. Which statement correctly describes the difference between lossy and lossless compression? TYPE 1
5. A digital image is 400 Γ 300 pixels with a 24-bit colour depth. The colour depth is changed to 8-bit. What effect does this have on file size? TYPE 1
6. Complete the table comparing the three image formats. For each of the 12 cells, write the correct value. (12 marks β 1 per cell) TYPE 2
GIF | Lossless | Yes | Yes (1-bit only) | Simple animated logos, icons with few colours
PNG | Lossless | No | Yes (full alpha) | Logos, diagrams, images needing transparent backgrounds
7. Explain why web developers need to compress images before uploading them to a website. (2 marks) TYPE 2
8. A web developer downloads a popular song from a streaming service and uses it as background music on their website. Explain why this is likely to break the law. Name the relevant law in your answer. (2 marks) TYPE 2
9. Describe how the sampling rate of an audio file affects both its quality and its file size. (2 marks) TYPE 2
10. A web developer is building a site for a wildlife photographer. Suggest the most appropriate image format for each of the following. Justify each answer. (4 marks) TYPE 2
(a) A detailed photograph of a golden eagle in flight.
(b) A simple animated logo of a running fox, with a transparent background.
(b) GIF (1 mark) β because GIF is the only standard format that supports both animation and transparency, making it suitable for a simple animated logo that must appear without a background. The 256-colour limit is acceptable for a simple graphic that does not need photographic colour range. (1 mark for justification)
Suggested timing: 2 hours. Warm up 5 min; vocabulary 10 min; notes + table walkthrough 25 min; worked examples 15 min; now you try 5 min; task set 55 min; review 5 min.
Key teaching point for the format table: Pupils consistently mix up which formats support animation vs transparency. A mnemonic that helps: "GIF Animates, PNG is Perfect transparency, JPEG is Just photos." Write it on the board and have pupils copy it into their notes before doing the table in Q6.
Warm-up Q3 is mathematically demanding: Explain the resolution calculation explicitly β 100Γ100 = 10,000; 200Γ200 = 40,000; ratio = 4. Use a visual: draw a 2Γ2 grid and show how doubling each side multiplies area by 4. This is a common 2-mark SQA question.
Copyright discussion point: Ask pupils why a streaming subscription does not normally give permission to copy a song onto a personal website. This opens a productive discussion about creators' rights, licences, and the limited legal exceptions that may apply.
SQA command words covered: "describe the difference" (Q9, needs contrast not just facts), "explain why" (Q7, Q8 β must say WHY not just WHAT), "suggest and justify" (Q10 β must name format AND give contextual reason).
Extension: Ask pupils to find three royalty-free images from Unsplash or Pixabay on a topic of their choice. For each image, identify: the format it downloads in; whether it would need to be converted for the web; and what licence it is under.