WPDev.one
Core Function
View Source on Trac ↗

wp_create_image_subsizes()

wp_create_image_subsizes( mixed $file, mixed $attachment_id )

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

Parameters 2 required

Name / Type Description
$file
string

Full path to the image file.

Required
$attachment_id
int

Attachment ID to process.

Required

Return Value

(array)
The image attachment meta data.

Function Information

Since Version
5.3.0
Source File
wp-admin/includes/image.php
Advertisement