Skip to content

Image optimization step in site generation #124

Closed
@pepinho24

Description

@pepinho24

Description

Some images in the documentation are not optimized and lower the PageScore of the page, especially on mobile devices and slower or metered internet connections. Part of #110

Possible solutions

The considered approaches are described in detail in this comment

Preferred solution

After discussions and meetings, the agreed approach is using the TinyPNG API because it provides the best compression to quality ratio.

Implementation

A test project for the local optimization of the images in a documentation repository is available in TinyPngCompressor repository.

Remaining tasks

  • Cross-platform easy to use solution added in docs-seed repo. E.g. a ruby and node.js scripts that can be used on Windows, MacOS and Linux. If a cross-platform solution is not possible, a build could be created that could run for each documentation based on repository passed as parameter.

Due to the TinyPNG compression algorithm, an optimized image needs to be flagged in order to avoid double optimization, which is introducing some difficulties on the cross-platform aspect.

  • Optional solution for repository automatization that will verify/optimize images on push or regularly(e.g. weekly,monthly), e.g. based on GitHub Actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    est: highEstimated for more than 5 dev daysfeaturenew functionality, style, behavior etchigh priorityThe task is with highest priorityperformanceThe is for optimizationsev: highImpacts all documentations sites

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions