Class GetImageAttributesOptions.Builder
-
- All Implemented Interfaces:
public final class GetImageAttributesOptions.BuilderA builder for GetImageAttributesOptions.
-
-
Method Summary
-
-
Method Detail
-
src
final GetImageAttributesOptions.Builder src(String src)
Accepts a relative or absolute path of the resource. If a relative path is provided, it is appended to the
urlEndpoint. If an absolute path is provided,urlEndpointis ignored.
-
src
final GetImageAttributesOptions.Builder src(JsonField<String> src)
Sets Builder.src to an arbitrary JSON value.
You should usually call Builder.src with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
urlEndpoint
final GetImageAttributesOptions.Builder urlEndpoint(String urlEndpoint)
Get your urlEndpoint from the ImageKit dashboard.
-
urlEndpoint
final GetImageAttributesOptions.Builder urlEndpoint(JsonField<String> urlEndpoint)
Sets Builder.urlEndpoint to an arbitrary JSON value.
You should usually call Builder.urlEndpoint with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiresIn
final GetImageAttributesOptions.Builder expiresIn(Double expiresIn)
When you want the signed URL to expire, specified in seconds. If
expiresInis anything above 0, the URL will always be signed even ifsignedis set to false. If not specified andsignedistrue, the signed URL will not expire (valid indefinitely).Example: Setting
expiresIn: 3600will make the URL expire 1 hour from generation time. After the expiry time, the signed URL will no longer be valid and ImageKit will return a 401 Unauthorized status code.
-
expiresIn
final GetImageAttributesOptions.Builder expiresIn(JsonField<Double> expiresIn)
Sets Builder.expiresIn to an arbitrary JSON value.
You should usually call Builder.expiresIn with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
queryParameters
final GetImageAttributesOptions.Builder queryParameters(SrcOptions.QueryParameters queryParameters)
These are additional query parameters that you want to add to the final URL. They can be any query parameters and not necessarily related to ImageKit. This is especially useful if you want to add a versioning parameter to your URLs.
-
queryParameters
final GetImageAttributesOptions.Builder queryParameters(JsonField<SrcOptions.QueryParameters> queryParameters)
Sets Builder.queryParameters to an arbitrary JSON value.
You should usually call Builder.queryParameters with a well-typed SrcOptions.QueryParameters value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
signed
final GetImageAttributesOptions.Builder signed(Boolean signed)
Whether to sign the URL or not. Set this to
trueif you want to generate a signed URL. IfsignedistrueandexpiresInis not specified, the signed URL will not expire (valid indefinitely). Note: IfexpiresInis set to any value above 0, the URL will always be signed regardless of this setting. Learn more.
-
signed
final GetImageAttributesOptions.Builder signed(JsonField<Boolean> signed)
Sets Builder.signed to an arbitrary JSON value.
You should usually call Builder.signed with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
transformation
final GetImageAttributesOptions.Builder transformation(List<Transformation> transformation)
An array of objects specifying the transformations to be applied in the URL. If more than one transformation is specified, they are applied in the order they are specified as chained transformations. See Chained transformations.
-
transformation
final GetImageAttributesOptions.Builder transformation(JsonField<List<Transformation>> transformation)
Sets Builder.transformation to an arbitrary JSON value.
You should usually call Builder.transformation with a well-typed
List<Transformation>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTransformation
final GetImageAttributesOptions.Builder addTransformation(Transformation transformation)
Adds a single Transformation to Builder.transformation.
-
transformationPosition
final GetImageAttributesOptions.Builder transformationPosition(TransformationPosition transformationPosition)
By default, the transformation string is added as a query parameter in the URL, e.g.,
?tr=w-100,h-100. If you want to add the transformation string in the path of the URL, set this topath. Learn more in the Transformations guide.
-
transformationPosition
final GetImageAttributesOptions.Builder transformationPosition(JsonField<TransformationPosition> transformationPosition)
Sets Builder.transformationPosition to an arbitrary JSON value.
You should usually call Builder.transformationPosition with a well-typed TransformationPosition value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
deviceBreakpoints
final GetImageAttributesOptions.Builder deviceBreakpoints(List<Double> deviceBreakpoints)
Custom list of device-width breakpoints in pixels. These define common screen widths for responsive image generation.
Defaults to
[640, 750, 828, 1080, 1200, 1920, 2048, 3840]. Sorted automatically.
-
deviceBreakpoints
final GetImageAttributesOptions.Builder deviceBreakpoints(JsonField<List<Double>> deviceBreakpoints)
Sets Builder.deviceBreakpoints to an arbitrary JSON value.
You should usually call Builder.deviceBreakpoints with a well-typed
List<Double>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addDeviceBreakpoint
final GetImageAttributesOptions.Builder addDeviceBreakpoint(Double deviceBreakpoint)
Adds a single Double to deviceBreakpoints.
-
imageBreakpoints
final GetImageAttributesOptions.Builder imageBreakpoints(List<Double> imageBreakpoints)
Custom list of image-specific breakpoints in pixels. Useful for generating small variants (e.g., placeholders or thumbnails).
Merged with
deviceBreakpointsbefore calculatingsrcSet. Defaults to[16, 32, 48, 64, 96, 128, 256, 384]. Sorted automatically.
-
imageBreakpoints
final GetImageAttributesOptions.Builder imageBreakpoints(JsonField<List<Double>> imageBreakpoints)
Sets Builder.imageBreakpoints to an arbitrary JSON value.
You should usually call Builder.imageBreakpoints with a well-typed
List<Double>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addImageBreakpoint
final GetImageAttributesOptions.Builder addImageBreakpoint(Double imageBreakpoint)
Adds a single Double to imageBreakpoints.
-
sizes
final GetImageAttributesOptions.Builder sizes(String sizes)
The value for the HTML
sizesattribute (e.g.,"100vw"or"(min-width:768px) 50vw, 100vw").If it includes one or more
vwunits, breakpoints smaller than the corresponding percentage of the smallest device width are excluded.If it contains no
vwunits, the full breakpoint list is used.
Enables a width-based strategy and generates
wdescriptors insrcSet.
-
sizes
final GetImageAttributesOptions.Builder sizes(JsonField<String> sizes)
Sets Builder.sizes to an arbitrary JSON value.
You should usually call Builder.sizes with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
width
final GetImageAttributesOptions.Builder width(Double width)
The intended display width of the image in pixels, used only when the
sizesattribute is not provided.Triggers a DPR-based strategy (1x and 2x variants) and generates
xdescriptors insrcSet.Ignored if
sizesis present.
-
width
final GetImageAttributesOptions.Builder width(JsonField<Double> width)
Sets Builder.width to an arbitrary JSON value.
You should usually call Builder.width with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final GetImageAttributesOptions.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final GetImageAttributesOptions.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final GetImageAttributesOptions.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final GetImageAttributesOptions.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final GetImageAttributesOptions.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final GetImageAttributesOptions build()
Returns an immutable instance of GetImageAttributesOptions.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.src() .urlEndpoint()
-
-
-
-