# Figures are missing from questions

**URL:** <https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201>\
**Category:** Feedback\
**Tags:** done, bug\
**Created:** [December 18, 2025, 12:37pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201 "2025-12-18T12:37:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcdanlj](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/mcdanlj/32/7_2.png) [@mcdanlj](https://forum.openhamprep.com/u/mcdanlj)\
**Post date:** [December 18, 2025, 12:37pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/1 "2025-12-18T12:37:37Z")

</div>

Some questions reference a figure.

- The app model for questions needs to have an optional reference to an image for the figure, and the app should host the image
- The figure should be displayed between the question text and the answers
- The figure should be included in the same place in the forum post for the question

 ![image](https://forum.openhamprep.com/uploads/default/original/1X/adf495cc00eab7a741bbaf162ef363e8903b2ed1.png)

> [@E9B05 - What type of antenna pattern is shown in Figure E9-2?](https://forum.openhamprep.com/t/e9b05-what-type-of-antenna-pattern-is-shown-in-figure-e9-2/675):
>
> Question What type of antenna pattern is shown in Figure E9-2? Answer Options A) Elevation B) Azimuth C) Near field D) Polarization Correct Answer: A Explanation Antenna radiation patterns are generally plotted in two orthogonal (perpendicular) planes to fully characterize the antenna’s radiation over a sphere. The two standard cuts are the horizontal plane and the vertical plane. Figure E9-2 plots the antenna’s gain (in dBi) against the vertical angle from the horizon (or ground …

---

<div class="post-metadata">

**Author:** ![sonyccd](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/sonyccd/32/9_2.png) [@sonyccd](https://forum.openhamprep.com/u/sonyccd)\
**Post date:** [December 18, 2025, 3:13pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/2 "2025-12-18T15:13:09Z")

</div>

Good idea. I will get started on this.

---

<div class="post-metadata">

**Author:** ![sonyccd](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/sonyccd/32/9_2.png) [@sonyccd](https://forum.openhamprep.com/u/sonyccd)\
**Post date:** [December 18, 2025, 4:35pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/3 "2025-12-18T16:35:08Z")

</div>

> <https://github.com/sonyccd/openhamprep/pull/70>
>
> \## Summary
> \- Add optional figure images to questions that reference figures (e.g…., "What type of antenna pattern is shown in Figure E9-2?")
> \- Figures display between question text and answers with an expand-to-lightbox feature
> \- Admin can upload/replace/delete figures via the admin questions console
> \- Figures are stored in Supabase Storage with PWA caching support
> 
> \## Changes
> 
> \### Database & Storage
> \- Add \`figure\_url\` column to questions table
> \- Create \`question-figures\` Supabase Storage bucket with RLS policies (public read, admin write)
> 
> \### Components
> \- \`FigureImage.tsx\` - Inline figure display with constrained size and expand button
> \- \`FigureLightbox.tsx\` - Full-screen lightbox with close via X, Escape, or click outside
> \- \`FigureUpload.tsx\` - Admin component for uploading/managing figures (2MB max, PNG/JPEG/GIF/WebP/SVG)
> 
> \### Integration
> \- QuestionCard displays FigureImage when question has a figure URL or references a figure
> \- AdminQuestions includes FigureUpload in edit/add dialogs
> \- Service worker caches figure images for offline PWA support
> 
> \### Seed Data
> \- Add \`figure\_url\` column to seed data
> \- Add 4 questions that reference figures to test placeholder functionality
> 
> \## Test plan
> \- \[\] Verify questions with \`figure\_url\` display the image between question text and options
> \- \[\] Verify questions that reference figures but have no URL show "Figure not available" placeholder
> \- \[\] Verify clicking figure opens lightbox; close via X, Escape, or click outside
> \- \[\] Verify admin can upload, replace, and delete figures
> \- \[\] Verify PWA caches figures for offline access
> \- \[\] Run \`npm test\` - all tests pass
> 
> 🤖 Generated with \[Claude Code\](https://claude.com/claude-code)

---

<div class="post-metadata">

**Author:** ![sonyccd](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/sonyccd/32/9_2.png) [@sonyccd](https://forum.openhamprep.com/u/sonyccd)\
**Post date:** [December 18, 2025, 7:29pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/4 "2025-12-18T19:29:27Z")

</div>

@mcdanlj you can now add images to any question in the admin interface

---

<div class="post-metadata">

**Author:** ![sonyccd](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/sonyccd/32/9_2.png) [@sonyccd](https://forum.openhamprep.com/u/sonyccd)\
**Post date:** [December 18, 2025, 8:33pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/5 "2025-12-18T20:33:09Z")

</div>

![Screenshot 2025-12-18 at 3.32.43 PM](https://forum.openhamprep.com/uploads/default/original/1X/ed54689cdc02629f35b98965ae0e633e00b61aa3.png)

---

<div class="post-metadata">

**Author:** ![mcdanlj](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/mcdanlj/32/7_2.png) [@mcdanlj](https://forum.openhamprep.com/u/mcdanlj)\
**Post date:** [December 18, 2025, 10:07pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/6 "2025-12-18T22:07:29Z")

</div>

And now with deep linking:

[https://app.openhamprep.com/questions/E9B01](https://app.openhamprep.com/questions/E9B01)

---

<div class="post-metadata">

**Author:** ![sonyccd](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/sonyccd/32/9_2.png) [@sonyccd](https://forum.openhamprep.com/u/sonyccd)\
**Post date:** [December 19, 2025, 1:07am UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/7 "2025-12-19T01:07:29Z")

</div>

I do not follow? Are you saying I need to change something with deeplinkgin?

---

<div class="post-metadata">

**Author:** ![mcdanlj](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/mcdanlj/32/7_2.png) [@mcdanlj](https://forum.openhamprep.com/u/mcdanlj)\
**Post date:** [December 19, 2025, 1:28am UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/8 "2025-12-19T01:28:43Z")

</div>

No, I was just showing that now we can follow a link to see the question that you showed an image of, just glad to see it! 🙂

---

<div class="post-metadata">

**Author:** ![mcdanlj](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/mcdanlj/32/7_2.png) [@mcdanlj](https://forum.openhamprep.com/u/mcdanlj)\
**Post date:** [January 2, 2026, 1:53pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/9 "2026-01-02T13:53:46Z")

</div>

This isn’t really #done until I finish extracting all the figures from all the test questions and adding them to the forum and the app. 😁

---

<div class="post-metadata">

**Author:** ![mcdanlj](https://forum.openhamprep.com/user_avatar/forum.openhamprep.com/mcdanlj/32/7_2.png) [@mcdanlj](https://forum.openhamprep.com/u/mcdanlj)\
**Post date:** [January 2, 2026, 11:09pm UTC](https://forum.openhamprep.com/t/figures-are-missing-from-questions/1201/10 "2026-01-02T23:09:07Z")

</div>

I have finished extracting the official images from [ncvec.org](http://ncvec.org) and applying them both on the forum and in the app.
