Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize and compress oversized bot logo images due to build warnings #818

Merged
merged 1 commit into from
May 1, 2024

Conversation

PeterDaveHello
Copy link
Collaborator

@PeterDaveHello PeterDaveHello commented Apr 28, 2024

Addressed build warnings by resizing and compressing several bot logo images that were significantly larger than necessary. The images were resized to 256x256 and compressed to enhance overall performance and reduce the distribution size, specifically:

  • gemma-2b-it-logo.png & gemma-7b-it-logo.png from 2048x2048 to 256x256
  • falcon-180b-logo.jpeg from 1024x1024 to 256x256

This change was made in response to build warnings about asset sizes exceeding recommended limits. Since most logos in public/bots are already 256x256 or smaller, adjusting the notably larger ones ensures uniformity and optimizes performance.

Although lmsys-logo.png and spark-logo.png are also somewhat large, resizing and compressing them did not offer any advantages in file size reduction, so they were left unchanged.

Build log warning for context:

WARNING Compiled with 2 warnings 10:13:10 PM

warning

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
fonts/materialdesignicons-webfont.0766edc9.eot (1.25 MiB)
fonts/materialdesignicons-webfont.fbaef2a9.woff2 (394 KiB)
fonts/materialdesignicons-webfont.e659bf56.woff (574 KiB)
fonts/materialdesignicons-webfont.714a4eee.ttf (1.25 MiB)
js/app.001036d0.js (608 KiB)
css/chunk-vendors.f38fd820.css (946 KiB)
js/chunk-vendors.0223b32a.js (2.72 MiB)
bots/falcon-180b-logo.jpeg (458 KiB)
bots/gemma-2b-it-logo.png (282 KiB)
bots/gemma-7b-it-logo.png (277 KiB)

Result:

public/bots/ernie-logo.png        | Bin 58762  -> 39612 bytes
public/bots/falcon-180b-logo.jpeg | Bin 468993 -> 53886 bytes
public/bots/gemma-2b-it-logo.png  | Bin 288702 -> 20031 bytes
public/bots/gemma-7b-it-logo.png  | Bin 283507 -> 18084 bytes
public/bots/vicuna-logo.jpeg      | Bin 53975  -> 32817 bytes
public/bots/you-logo.png          | Bin 44256  -> 41765 bytes

Copy link

vercel bot commented Apr 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chatall ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2024 6:08pm

Addressed build warnings by resizing and compressing several bot logo
images that were significantly larger than necessary. The images were
resized to 256x256 and compressed to enhance overall performance and
reduce the distribution size, specifically:

- gemma-2b-it-logo.png & gemma-7b-it-logo.png from 2048x2048 to 256x256
- falcon-180b-logo.jpeg from 1024x1024 to 256x256

This change was made in response to build warnings about asset sizes
exceeding recommended limits. Since most logos in public/bots are
already 256x256 or smaller, adjusting the notably larger ones ensures
uniformity and optimizes performance.

Although lmsys-logo.png and spark-logo.png are also somewhat large,
resizing and compressing them did not offer any advantages in file size
reduction, so they were left unchanged.

Build log warning for context:
```
WARNING Compiled with 2 warnings 10:13:10 PM

warning

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
fonts/materialdesignicons-webfont.0766edc9.eot (1.25 MiB)
fonts/materialdesignicons-webfont.fbaef2a9.woff2 (394 KiB)
fonts/materialdesignicons-webfont.e659bf56.woff (574 KiB)
fonts/materialdesignicons-webfont.714a4eee.ttf (1.25 MiB)
js/app.001036d0.js (608 KiB)
css/chunk-vendors.f38fd820.css (946 KiB)
js/chunk-vendors.0223b32a.js (2.72 MiB)
bots/falcon-180b-logo.jpeg (458 KiB)
bots/gemma-2b-it-logo.png (282 KiB)
bots/gemma-7b-it-logo.png (277 KiB)
```

Result:
```
public/bots/ernie-logo.png        | Bin 58762  -> 39612 bytes
public/bots/falcon-180b-logo.jpeg | Bin 468993 -> 53886 bytes
public/bots/gemma-2b-it-logo.png  | Bin 288702 -> 20031 bytes
public/bots/gemma-7b-it-logo.png  | Bin 283507 -> 18084 bytes
public/bots/vicuna-logo.jpeg      | Bin 53975  -> 32817 bytes
public/bots/you-logo.png          | Bin 44256  -> 41765 bytes
```
@sunner sunner merged commit c2f9221 into ai-shifu:main May 1, 2024
2 checks passed
@PeterDaveHello PeterDaveHello deleted the ResizeTooLargeImages branch May 1, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants