wc_rest_allowed_image_mime_types()WC 2.6.4

Returns image mime types users are allowed to upload via the API.

Return

Array.

Usage

wc_rest_allowed_image_mime_types();

Changelog

Since 2.6.4 Introduced.

wc_rest_allowed_image_mime_types() code WC 8.9.0

function wc_rest_allowed_image_mime_types() {
	return apply_filters(
		'woocommerce_rest_allowed_image_mime_types',
		array(
			'jpg|jpeg|jpe' => 'image/jpeg',
			'gif'          => 'image/gif',
			'png'          => 'image/png',
			'bmp'          => 'image/bmp',
			'tiff|tif'     => 'image/tiff',
			'ico'          => 'image/x-icon',
			'webp'         => 'image/webp',
		)
	);
}