Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jmablog committed Aug 30, 2020
1 parent 579505f commit 1e41a7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ shrunk_img <- tinify("imgs/example.png", return_path = "abs")
knitr::include_graphics(shrunk_img)
```

Set to `return_path = "rel"` to return the file path relative to the working directory at the time the file was shrunk. This may be useful if sharing a script with others across platforms, if you can be sure your project setups will be the same and you are being strict with working directories. Finally, set to `return_path = "all"` to return both types of file path as a named list:
Set to `return_path = "rel"` to return the file path relative to the working directory at the time the file was tinified. This may be useful if sharing a script with others across platforms, if you can be sure your project setups will be the same and you are being strict with working directories. Finally, set to `return_path = "all"` to return both types of file path as a named list:

```r
shrunk_img_list <- tinify("imgs/example.png", return_path = "all")

knitr::include_graphics(shrunk_img_list$absolute)
```

## Resizing Image Dimensions
## Resizing image dimensions

You can also use the `resize` argument to change the image dimensions along with it's filesize. I recommend reading the [TinyPNG API documentation on resizing methods](https://tinypng.com/developers/reference#resizing-images) first, to familiarise yourself with the various options you can use to change image dimensions.

Expand Down

0 comments on commit 1e41a7a

Please sign in to comment.