Skip to content

Automate using webp for images to save repository size #1549

Open
@honzajavorek

Description

@honzajavorek

Under #1424, @vdusek suggested using webp would result in much smaller images. @B4nan agrees:

The size of the repo is also important, if the difference is 5x let's just go with webp. We use them pretty much exclusively in the crawlee blog posts too for the same reason.
#1424 (comment)

Since the images are already technically part of the repository, replacing them with optimized webp images would just add to the repo size right now. As this is not the first time we're discussing images under PRs, I think this topic deserves a tracking issue.

What is the preferred way to handling images? My take:

I’m already putting new images through optimizt every time before commit, and it has an option to convert to webp. I just wonder if we could have it as a pre-commit so I don’t have to think about it. But changing extension breaks the path to the image, so I guess this must be a manual process… Unless I write myself a Python script to do the magic… 😅
#1424 (comment)

Alternatively, the pre-commit would at least prevent me from committing other than webp images, so that I'm forced to do the manual work and not to forget about it.

The Docusaurus site should optimize the images automatically on deploy, so we're talking only about the repository size here – there should be no impact on viewers of the site, either way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-academyIssues related to Web Scraping and Apify academies.t-docsIssues owned by technical writing team.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions