imgix: Fetch images from the imgix rest api

Description Usage Arguments Examples

View source: R/imgixr.R

Description

functions to load images using the imgix rest api

Usage

1
2
3
4
5
6
7
8
imgix(
  img,
  fit = c("crop", "clamp", "clip", "facearea", "fill", "fillmax", "max", "scale"),
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

img

an url to an image or a numeric. If a numeric is given, it is treated as an image id for pexels.com

fit

Resize fit mode. See https://docs.imgix.com/apis/rendering/size/fit. the Default value was changed from 'clip' to 'crop'.

...

API query parameters

width

Fixed width for widget (in css units). The default is NULL, which results in intelligent automatic sizing based on the widget's container.

height

Fixed height for widget (in css units). The default is NULL, which results in intelligent automatic sizing based on the widget's container.

elementId

Use an explicit element ID for the widget (rather than an automatically generated one). Useful if you have other JavaScript that needs to explicitly discover and interact with a specific widget instance.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# images from gregordecillia.github.io/pipedream
imgix(7417579)
imgix(268854)
imgix('https://images.pexels.com/photos/45848/kumamoto-japan-aso-cloud-45848.jpeg')
imgix(4203587)
imgix(2837863)

imgix(4203587, txt = "hello", txt_size = 262, txt_color = "fff")
imgix(4203587, rot = 45)
imgix(4203587, blur = 50)
imgix(2837863, sepia = 50)
imgix(2837863, duotone = "191970,F08080", duotone_alpha = 60)

imgix(2339009)
imgix(2339009, invert = TRUE)

imgix("https://images.unsplash.com/photo-1459478309853-2c33a60058e7")
imgix("https://images.unsplash.com/photo-1523712999610-f77fbcfc3843")
imgix("https://images.unsplash.com/photo-1485345488606-f2ab4a113932")

imgix("https://assets.imgix.net/unsplash/hotairballoon.jpg")

imgix('https://static.imgix.net/espresso.jpg')
imgix('https://static.imgix.net/treefrog.jpg')
imgix('https://assets.imgix.net/examples/couple.jpg')
imgix('https://assets.imgix.net/unsplash/umbrella.jpg')
imgix('https://static.imgix.net/lorie.png')
imgix('https://assets.imgix.net/trim-ex4.jpg')
imgix('https://assets.imgix.net/trim-ex3.jpg')
imgix('https://assets.imgix.net/trim-ex5.jpg')
imgix('https://assets.imgix.net/examples/redleaf.jpg')
imgix('https://assets.imgix.net/examples/blueberries.jpg')
imgix('https://assets.imgix.net/examples/bluehat.jpg')
imgix('https://assets.imgix.net/blog/unsplash-kiss.jpg')
imgix('https://assets.imgix.net/examples/pione.jpg')
imgix('https://assets.imgix.net/dog.jpg')
imgix('https://assets.imgix.net/blog/woman-hat.jpg')
imgix('https://assets.imgix.net/flower.jpg')
imgix('https://assets.imgix.net/coffee.jpg')
imgix('https://ix-www.imgix.net/solutions/kingfisher.jpg')
imgix('https://ix-www.imgix.net/solutions/daisy.png')

imgix(2526037)

r-webutils/imgix-r documentation built on Dec. 23, 2021, 12:18 a.m.