Code Monkey home page Code Monkey logo

Comments (4)

zerolab avatar zerolab commented on August 26, 2024 1

Hey @udbhavsomani thank you for expressing your interest. Go for it. The rule is that unless the issue or a comment on the issue explicitly says not to, and there is no-one else who is working on it, then feel free to leave a note that you are working on it, or just open a draft PR. See https://dev.to/lb/ten-tasty-ingredients-for-a-delicious-pull-request-hgc for a lot of useful tips

from wagtail.org.

udbhavsomani avatar udbhavsomani commented on August 26, 2024

Hi @zerolab, I am new to contributing to wagtail, shall I proceed with this issue if not resolved already?

from wagtail.org.

udbhavsomani avatar udbhavsomani commented on August 26, 2024

Hi @zerolab, please review my PR: #359

from wagtail.org.

thibaudcolas avatar thibaudcolas commented on August 26, 2024

I’d like to propose we don’t do this via GitHub Actions, and instead do it manually. We can document the process to do it manually via something like Squoosh if we want, which should give the same image optimisation benefits without the drawbacks I foresee.

The drawbacks are:

  1. As-is, the Calibre action will always attempt to re-optimise images no matter how many times it’s already attempted in the past (see calibreapp/image-actions#92). This is massively wasteful on CPU, which has a clear energy and environmental cost.
  2. If the Calibre action decides to optimise an image, then it’s an extra commit with the newly-compressed images. This effectively at least doubles the space images will take in the git history (as many times as there’s been optimisations). Whereas if we optimise more manually we can be more cautious about how many times we do so and whether the savings are worth the bloat in the git history.

The possible benefits also seem way too small to me:

  • There are 8 images currently in the repo that could benefit from this. None of them are particularly prone to change
  • For any new work on the site, we’d want to support dark mode, which almost entirely rules out usage of raster images for styling purposes (it’s much easier to theme SVGs).

So – if we want to improve on image size, my preference would be to:

  1. Convert all raster images we can to SVGs. For example we could push harder on SVG favicons.
  2. Document how we optimise the raster images we keep

from wagtail.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.