MCPcopy Create free account
hub / github.com/DiUS/java-faker / image

Method image

src/main/java/com/github/javafaker/Internet.java:86–92  ·  view source on GitHub ↗

Generates a random image url based on the lorempixel service. All the images provided by this service are released under the creative commons license (CC BY-SA). For more information, please visit: http://lorempixel.com/ @return an url to a random image. @see loremp

()

Source from the content-addressed store, hash-verified

84 * @see <a href="http://lorempixel.com/">lorempixel - Placeholder Images for every case</a>
85 */
86 public String image() {
87 String[] dimension = StringUtils.split(faker.fakeValuesService().resolve("internet.image_dimension", this, faker), 'x');
88 if (dimension.length == 0) return "";
89 return image(
90 Integer.valueOf(StringUtils.trim(dimension[0])), Integer.valueOf(StringUtils.trim(dimension[1])),
91 faker.bool().bool(), null);
92 }
93
94 /**
95 * Same as image() but allows client code to choose a few image characteristics

Callers

nothing calls this directly

Calls 3

fakeValuesServiceMethod · 0.80
resolveMethod · 0.45
boolMethod · 0.45

Tested by

no test coverage detected