Set your TinyPNG API key in the system environment, so it is no longer necessary to explicitly provide an API key with every call of tinify().

tinify_key(key)

Arguments

key

A string containing your TinyPNG.com API key.

Details

You can get a TinyPNG API key from https://tinypng.com/developers.

See also

tinify() to shrink image filesizes

tinify_defaults() to set default arguments so they do not need to be provided with every call of tinify()

Examples

if (FALSE) {
tinify_key("YOUR-API-KEY-HERE")
}