[img_process/]
provides general access to all the other IMG Processor transformations. For other shortcodes, the transformation is implied in the shortcode name. Here, the transformation is specified in the shortcode’s transform
attribute. The following statements are equivalent.
[img_process transform="{type}" /]
[[img_{type} /]]
Note: WP does not support nested shortcodes with identical names. Substituting [img_process/]
for one of the duplicates allows the same type of transformation to be run twice on the same source image. The following statements are equivalent.
[img_fit output="img"][img_process transform="fit" output="url" /][/img_fit]
[img_process transform="fit" output="img"][img_fit output="url" /][/img_process]
transform="fit"
[img_process transform="fit" output="img" width="200" height="200"]atest.gif[/img_process]
<img src="/wp-content/uploads/image-cache/1d2cf16c/atest_gif/fit_200_200.gif" width="142" height="200" alt="atest.gif" />
transform="info"
[img_process transform="info" output="info"]atest.gif[/img_process]
- img:
- file: /srv/plugins.tenandtwo.com/htdocs/wp-content/uploads/image-source/atest.gif
- url: /wp-content/uploads/image-source/atest.gif
- width: 172
- height: 243
- type: GIF
- content_type: image/gif
- readable: 1
- writeable:
- bytes: 20341
- resolution: 0,0
- datetime: 2024-04-06 17:19:51
- dir: /srv/plugins.tenandtwo.com/htdocs/wp-content/uploads/image-source/
- basename: atest.gif
- name: atest
- ext: gif
- alt: atest.gif
- _usage:
- cli-command:
wp img_process info --output="info" /wp-content/uploads/image-source/atest.gif
- api-nocache:
<img src="/wp-content/plugins/tenandtwo-img-processor/api.php?source=%2Fwp-content%2Fuploads%2Fimage-source%2Fatest.gif&transform=none&output_nocache=1" width="172" height="243" alt="atest.gif" />
- wp-shortcode-img:
[img_info output="img"]/wp-content/uploads/image-source/atest.gif[/img_info]
- wp-shortcode-html:
[img_info output="html" img-id="IMG-ID" alt="ALT" title="TITLE" style="STYLE" decoding="auto|async|sync" loading="eager|lazy"]/wp-content/uploads/image-source/atest.gif[/img_info]
- wp-shortcode-figure:
[img_info output="figure" figure-id="FIGURE-ID" figure-class="FIGURE-CLASS" caption="CAPTION" caption-class="CAPTION-CLASS" img-id="IMG-ID" alt="ALT" title="TITLE" style="STYLE" decoding="auto|async|sync" loading="eager|lazy"]/wp-content/uploads/image-source/atest.gif[/img_info]
- cli-command: