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

[Optimization] Deep Zoom Assets in webp format #960

Open
tihuan opened this issue Jun 3, 2024 · 0 comments
Open

[Optimization] Deep Zoom Assets in webp format #960

tihuan opened this issue Jun 3, 2024 · 0 comments
Labels
backend core backend (rest api, web, engine) data-viz Data Viz Team frontend front-end issue P0 Priority 0 - Critical, fix ASAP!

Comments

@tihuan
Copy link
Contributor

tihuan commented Jun 3, 2024

Context:

  1. WebP format is better for web, so we should use it

DoD:

  1. CXG conversion script will upload webp files instead of jpeg
  2. FE might need some adjustment in order to consume the webp assets

Context:

  1. Image Quality and Compression:

    • JPEG is a widely-used format that offers good compression and quality for photographs. However, it uses lossy compression, which can introduce artifacts, especially at lower quality settings.
    • WebP can offer better compression and quality than JPEG at similar file sizes. It supports both lossy and lossless compression, making it versatile for different types of images.
  2. File Size:

    • WebP often provides smaller file sizes than JPEG for the same quality level. Smaller file sizes mean faster load times and less bandwidth usage, which can be particularly beneficial for web performance.
  3. Browser Support:

    • JPEG is universally supported by all web browsers.
    • WebP is supported by most modern browsers, but there may still be some edge cases or older browsers that do not support it. If you need to support older browsers, you may need a fallback to JPEG.
  4. Decoding Performance:

    • Decoding performance can vary between JPEG and WebP. Modern browsers are optimized for both, but WebP decoding can sometimes be more efficient due to its advanced compression algorithms.
  5. Canvas Performance:

    • Once an image is loaded into the canvas, it is rasterized, and its format does not directly affect the canvas rendering performance. However, the initial loading time and decoding speed can impact how quickly the image appears and is available for manipulation on the canvas.
  6. Feature Support:

    • WebP supports features like transparency (alpha channel) and animation, which JPEG does not. If your use case requires these features, WebP might be the better choice.
@tihuan tihuan added backend core backend (rest api, web, engine) data-viz Data Viz Team frontend front-end issue P0 Priority 0 - Critical, fix ASAP! labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend core backend (rest api, web, engine) data-viz Data Viz Team frontend front-end issue P0 Priority 0 - Critical, fix ASAP!
Projects
None yet
Development

No branches or pull requests

1 participant