Skip to content

Commit

Permalink
docs(readme): improve example usage code
Browse files Browse the repository at this point in the history
  • Loading branch information
azabroflovski committed Apr 3, 2024
1 parent f6c98ae commit cb80c66
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ $ npm i thumbor-client
import { createThumbor } from 'thumbor-client'

const thumbor = createThumbor({
url: 'https://url-to-thumbor.com',
url: 'https://your-thumbor.com',
key: 'secret'
})

const imgUrl = thumbor
.fromUrl('https://somesite.com/cat.jpeg')
.fromUrl('https://cataas.com/cat')
.smartCrop(true)
.resize(500, 0)
.resize(300, 200)
.buildURL()

console.log(imageUrl) // https://your-thumbor.com/unsafe/300x200/smart/https://cataas.com/cat
```

## LICENSE
Expand Down

0 comments on commit cb80c66

Please sign in to comment.