TagConfig
class TagConfig extends BaseConfigSection
Defines the global configuration for html tags generated using the Cloudinary PHP SDK.
Properties
| bool | $responsive | Whether to generate responsive image tags. | |
| string | $responsiveClass | The class of the responsive tag. | |
| string | $responsivePlaceholder | The value of the 'src' attribute. | |
| bool|int|string | $sizes | Whether to automatically generate "sizes" attribute if not provided. | |
| bool | $hidpi | Whether to use hi dpi. | |
| bool | $clientHints | Whether to use client hints. | |
| bool | $unsignedUpload | Whether to perform unsigned upload in the UploadTag. | |
| string | $useFetchFormat | Whether to use fetch format transformation ("f_") instead of file extension. | |
| bool | $voidClosingSlash | Defines whether to add slash to the void tag ending, e.g. "/>" or simply ">". | |
| bool | $sortAttributes | Defines whether to sort attributes by keys alphabetically. | |
| bool | $prependSrcAttribute | Defines whether to set "src" attribute first. | |
| string | $videoPosterFormat | Image format of the video poster. | |
| string | $quotesType | Sets the type of the quotes to use (single or double). Default: BaseTag::DOUBLE_QUOTES. | |
| string | $contentDelimiter | The delimiter between content items. | |
| float | $relativeWidth | The percentage of the screen that the image occupies. |
Methods
videoPosterFormat(string $format)
Image format of the video poster.
useFetchFormat(bool $useFetchFormat = true)
Use fetch format transformation ("f_") instead of file extension.
Details
$this
videoPosterFormat(string $format)
Image format of the video poster.
$this
useFetchFormat(bool $useFetchFormat = true)
Use fetch format transformation ("f_") instead of file extension.
Constants
| CONFIG_NAME |
|
| DEFAULT_VIDEO_POSTER_FORMAT |
|
| DEFAULT_QUOTES_TYPE |
|
| DEFAULT_CONTENT_DELIMITER |
|
| DEFAULT_RELATIVE_WIDTH |
|
| RESPONSIVE |
|
| RESPONSIVE_CLASS |
|
| RESPONSIVE_PLACEHOLDER |
|
| SIZES |
|
| RELATIVE_WIDTH |
|
| HIDPI |
|
| CLIENT_HINTS |
|
| UNSIGNED_UPLOAD |
|
| VIDEO_POSTER_FORMAT |
|
| USE_FETCH_FORMAT |
|
| QUOTES_TYPE |
|
| VOID_CLOSING_SLASH |
|
| SORT_ATTRIBUTES |
|
| PREPEND_SRC_ATTRIBUTE |
|
| CONTENT_DELIMITER |
|