Recently, I ran into an interesting issue on Rekkoku, my side project that recommends food places. The problem?
Some post images suddenly disappeared.
When a user creates a post on Rekkoku, the system doesn’t require manual uploads. Instead, it scrapes metadata from the shared link preview pulling the place name, description, and thumbnail photo directly from Google Maps metadata.
It worked perfectly… until it didn’t.
After debugging the network calls, I noticed that the image URLs were returning HTTP 403 (Forbidden).
My conclusion: Google Maps rotates or expires certain thumbnail image URLs after a certain period. This means that old URLs are no longer accessible, leaving broken images on Rekkoku.
At first, I thought of building a scheduler that runs every two weeks, scanning all places and refreshing any broken images.
But since Rekkoku still has a small user base (easy enough to monitor manually), I decided on a simpler approach: 👉 Build an on-demand API to handle this issue.
Here's how the mechanism works:
After implementing this mechanism, the missing images came back with fresh thumbnails problem solved. 🎉
This small incident was a good reminder that when relying on external metadata sources, it’s important to plan for expiry, rotation, or API behavior changes.
👉 Next time, I might still implement the scheduled job if Rekkoku grows bigger. But for now, this on-demand API keeps things simple and effective.