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 big images and compress them #120

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/check-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: check-image-size
on:
- pull_request
jobs:
check-image-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- shell: bash
run: |
files=$(git diff --name-only origin/${{ github.base_ref }} | grep -E '.+\.png$' | xargs du -h --threshold=1M | cut -f2)
for file in $files; do
echo "::warning title=Big image,file=$file::This image is bigger than 1MB. Consider reducing its pixel size to match the actual size on the website, or use pngcrush or similar to maximize the compression"
done
if ! [[ -z "$files" ]]; then
exit 1
fi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2016-01-04-our-first-award!/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2016-01-18-fast-track-to-scala---training/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2016-06-20-functional-rotterdam---10-/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2016-08-17-moving-from-java-to-scala/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2016-09-05-shapeless---computing-deltas/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2016-09-12-a-journey-to-scalacheck/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2016-12-19-functional-rotterdam--15/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/2018-04-16-nn-rotterdam-marathon-2018/background.png
Binary file modified media/2018-05-25-scala-days-2018-review/background.png
Binary file modified media/2018-07-05-dutch-clojure-meetup/background.png
Binary file modified media/2018-07-19-curry-on-amstedam-2018/background.png
Binary file modified media/2018-07-23-curry-on-2018-impressions/background.png
Binary file modified media/2018-10-19-reactive-summit-montreal-2018/background.png
Binary file modified media/2018-11-07-lunatech-airport-assessment/background.png
Binary file modified media/2019-03-05-fridays-internal-workshop/background.png
Binary file modified media/2019-06-04-guardrail-with-http4s-tutorial/background.png
Binary file modified media/2019-08-27-message-reliability-in-kafka/background.png
Binary file modified media/2020-11-26-senior-to-be-or-not-to-be/background.png
Binary file modified media/2021-01-29-airports-at-scale/background.png
Binary file modified media/2021-04-28-calculating-pi-concurrently/background.png
Binary file modified media/2021-10-30-introduction-gatling-en/background.png
Binary file modified media/2021-10-30-introduction-gatling-fr/background.png
Binary file modified media/2022-01-03-kryo-pitfalls/background.png
Binary file modified media/2022-04-05-bootiful-zio/background.png
Binary file modified media/2022-07-02-sunny-tech-en/background.png
Binary file modified media/2022-07-02-sunny-tech-fr/background.png
Binary file modified media/2022-07-02-sunny-tech/background.png
Binary file modified media/2022-07-11-foldleft-introduction-en/background.png
Binary file modified media/2022-07-11-foldleft-introduction-fr/background.png
Binary file modified media/2022-12-20-automation-star-conference/background.png
Binary file modified media/2023-03-24-argo-cd/background.png
Binary file modified media/2023-03-31-embrace-kotlin/background.png
Binary file modified media/2023-04-13-rust-by-examples/background.png
Binary file modified media/2023-05-17-advanced-kotlin/background.png
Binary file modified media/2023-05-19-hibernate-reactive-gotchas/background.png
Binary file modified media/2023-06-07-kotlin-ktor-keycloak/background.png
Binary file modified media/2023-07-15-riviera-dev/background.png
Loading