forgejo/public/assets/img
Gusted b86aefc038 chore: use sharp to generate images (#7512)
- `tools/generate-images.js` is used to convert SVGs to resized optimized SVGs and resized optimized PNG. Although it would be best to drop generating images from SVG, the usage of these images do not accept a SVG.
- The script relied on two dependencies being installed on-the-fly, this is suboptimal as it means its integrity was not saved in package-lock.json and no specific version was specified which makes reproducible builds harder. `imagemin-zopfli` was not updated in 4 years and seems to use dependency that generate funny message about memory leaks and using no longer maintained dependencies.
- Use [`sharp`](https://sharp.pixelplumbing.com/) to do the image conversion, this installs two binaries on Linux (glibc/musl) and are responsible for 5% of the `node_modules` directory size. Add this to package.json as a dev dependencies to ensure the integrity can be verified and help reproducible builds.
- Drop the `gitea` conversion, I cannot find this being used within Forgejo (my best guess is that e20cd83bc5 dropped the usage of it).
- Resolves forgejo/forgejo#7232

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7512
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-11 15:12:50 +00:00
..
emoji [BRANDING] Add forgejo emoji 2024-02-05 16:02:13 +01:00
svg Alt Linux Apt-Rpm repository support for Forgejo packages. (#6351) 2025-01-22 14:01:49 +00:00
apple-touch-icon.png chore: use sharp to generate images (#7512) 2025-04-11 15:12:50 +00:00
avatar_default.png chore: use sharp to generate images (#7512) 2025-04-11 15:12:50 +00:00
checkmark.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
dingtalk.ico Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
discord.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
favicon.png chore: use sharp to generate images (#7512) 2025-04-11 15:12:50 +00:00
favicon.svg [BRANDING] add Forgejo logo 2024-02-05 16:02:13 +01:00
feishu.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
forgejo-loading.svg Do not change stroke size in the loading animation 2024-10-09 12:20:29 +00:00
forgejo.svg [BRANDING] add Forgejo logo 2024-02-05 16:02:13 +01:00
gitea-original.svg [BRANDING] add Forgejo logo 2024-02-05 16:02:13 +01:00
gogs.ico Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
logo.png chore: use sharp to generate images (#7512) 2025-04-11 15:12:50 +00:00
logo.svg [BRANDING] add Forgejo logo 2024-02-05 16:02:13 +01:00
msteams.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
openid-16x16.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
packagist.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
repo_default.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
slack.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
sourcehut.svg [FEAT] sourcehut webhooks 2024-04-05 10:20:40 +02:00
telegram.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
wechatwork.png Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00