Skip to content

tinyimg

Optimize and Compress Images

v0.4 · Apr 14, 2026 · MIT + file LICENSE

Description

Optimize and compress images using 'Rust' libraries to reduce file sizes while maintaining image quality. Supports PNG palette reduction and dithering via the 'exoquant' crate before lossless PNG optimization via the 'oxipng' crate, and JPEG re-encoding via the 'mozjpeg' crate. The package provides functions to optimize individual image files or entire directories, with configurable compression levels. Use tinyimg() as a convenient entry point for mixed PNG/JPEG workflows.

Downloads

CRAN

458

Last 30 days

9120th

1.5K

Last 90 days

2.2K

Last year

Trend: -9% (30d vs prior 30d)

r2u CRAN

24

Last 30 days

121

Last 90 days

194

Last year

Trend: -38.5% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 2, 2026
NOTE 11 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
NOTE r-release-macos-x86_64

compiled code

File ‘tinyimg/libs/tinyimg.so’:
  Found non-API calls to R: ‘R_MissingArg’, ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 16, 2026
NOTE 13 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 27, 2026
NOTE r-devel-linux-x86_64-debian-gcc

compiled code

File ‘tinyimg/libs/tinyimg.so’:
  Found non-API calls to R: ‘R_MissingArg’, ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code intelligence has not been computed for this package yet.

Code

Structure

Lines of code

764

Files

26

Compiled share

3.5%

Has compiled src

Yes

Language breakdown

R 189 (24.7%)C/C++/src 27 (3.5%)Tests 377 (49.3%)Docs 171 (22.4%)

API

Exported functions

4

Internal functions

3

Recent export changes

v0.4+3 tiny_output, tinyimg, tinyjpg
v0.3+1 tinypng  −1 optim_png

Testing & CI

Has tests

Yes

Test-to-code ratio

1.99

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

2

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

3

First release

2026-02-20

Latest release

2026-04-14

Avg cadence

27 days

Cold removal rate

100%

Dep drift

0

LOC over versions

v0.2: 317 LOCv0.3: 396 LOCv0.4: 764 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Version History

4 tracked
updated 0.4 ← 0.3 diff Apr 14, 2026
new 0.3 Mar 10, 2026
updated 0.3 ← 0.2 diff Mar 5, 2026
new 0.2 Feb 19, 2026