hdurl serves a recompressed JPEG, and some archive entries lost their full-resolution image

Open
#183 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Start with the apod-basic feed's hdurl generation and compare its /dynamicimage/ URLs with the corresponding /content/dam/ assets for the dates listed. Check how the five reduced-only entries are represented and whether their original files are available for migration; done means hdurl preserves the original full-resolution file where available and the missing originals are addressed.

Written by the indexing model from the issue text.

Description

Thanks for keeping APOD available after the migration. I maintain an app built legacy on "apod api" and now migrated to the new apod-basic feed and compared its hdurl with the images the original apod.nasa.gov/apod/apYYMMDD.html pages linked to (via Wayback Machine snapshots).

1. hdurl is a recompressed copy, not the original file

For 2026-09-29 (apod-basic/260929) the original page linked image/2609/Shrimp_Pawel_2048.jpg:

Source Size Dimensions
original apod.nasa.gov/apod/image/2609/Shrimp_Pawel_2048.jpg 347,494 B 2048×2560
assets.science.nasa.gov/content/dam/…/2026/september/Shrimp_Pawel_2048.jpg 347,494 B (byte-identical) 2048×2560
hdurl: assets.science.nasa.gov/dynamicimage/assets/…/Shrimp_Pawel_2048.jpg?w=2048&h=2560&fit=clip&crop=faces%2Cfocalpoint 224,780 B 2048×2560

The /dynamicimage/ response has the same pixel size but is re-encoded with coarser JPEG quantization (mean luminance quantization step 23.1 vs 15.2 in the original), so the "HD" image is visibly softer than before. Quality parameters such as q/quality have no effect.

To reproduce without the retired API: the original is preserved on the Wayback Machine (https://web.archive.org/web/20260929040611id_/https://apod.nasa.gov/apod/image/2609/Shrimp_Pawel_2048.jpg) and is byte-identical (same MD5) to the /content/dam/ copy, while the hdurl response differs.

2. Some entries only have the reduced web copy
Date Original full-size image hdurl in apod-basic
2020-08-12 NeowiseSequence_Llorens_3044_annotated.jpg — 3044×2904 …_960_annotated.jpg — 960×916
2022-10-10 LunarAnalemma_Turksoy_6755.jpg — 6755×4533 …_1080.jpg — 1080×725
2025-01-01 AlphaCen_Cantrell_3429.jpg — 3429×3246 …_960.jpg — 960×909
2025-05-05 PlanetLines_Hervas_2603.jpg — 2603×3241 …_960.jpg — 960×1195
2025-08-12 PerseidsRadiant_Marcin_5500.jpg — 5500×3706 …_1080.jpg — 1080×728

These originals are not on the CDN (e.g. …/content/dam/…/2022/october/LunarAnalemma_Turksoy_6755.jpg returns 404). In a sample of 16 image days from 2020–2025, 5 were affected.

Questions
  1. Could hdurl point to the original file (/content/dam/…) rather ticimage/` copy?
  2. Are the missing full-resolution originals going to be migrated?
Dominant language
Python
Stars
1.1k
Forks
218
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nasa/apod-api

All issues in nasa/apod-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.