wp_create_image_subsizes


wp_create_image_subsizes ( $file, $attachment_id )

Parameters:
  • (string) $file Full path to the image file.
  • (int) $attachment_id Attachment Id to process.
Returns:
  • (array) The image attachment meta data.
Defined at:

Description

Creates image sub-sizes, adds the new data to the image meta `sizes` array, and updates the image metadata.

Intended for use after an image is uploaded. Saves/updates the image metadata after each sub-size is created. If there was an error, it is added to the returned image metadata array.

Related Functions

wp_update_image_subsizes, wp_ajax_media_create_image_subsizes, wp_get_registered_image_subsizes, wp_calculate_image_sizes, wp_get_missing_image_subsizes

Top Google Results

User discussions

wpseek mobile