sprig icon indicating copy to clipboard operation
sprig copied to clipboard

Image metadata is deprecated?

Open GalaxyGamingBoy opened this issue 1 year ago • 0 comments

Describe the bug All games on Sprig have a few metadata properties (i.e. @title, @author) and one of them is @img. After investigating some games that in the img property used "filename.png", I noticed the web browser make a call to /gallery/game.png. That however points to the gallery editor and the img itself. After looking more into the source code I located that the image source is now loaded via the already existing sprig API.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://sprig.hackclub.com/gallery'
  2. Check Vercel/Console log
  3. Notice the error about filename.png

Expected behavior The game img loads normally without any errors

Actual behavior
The game img loads normally but games with the specified @img tag point to bad path.

Solution The solution is rather easy:

- [ ] Remove the src attribute from the gallery.tsx
- [ ] Remove the `@img` tag from the template
- [ ] Edit metadata generate hook to not use `@img`
- [ ] Mass remove all mentions `@img` from games

Screenshots If applicable, add screenshots to help explain your problem. image image image

GalaxyGamingBoy avatar Apr 06 '24 16:04 GalaxyGamingBoy