wp_create_image_subsizes ( $file, $attachment_id )
- (string) file Full path to the image file.
- (int) attachment_id Attachment Id to process.
- (array) The image attachment meta data.
- Introduced in WordPress: 5.3.0
- Deprecated in WordPress: —
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.