wphooks.info - fallback_intermediate_image_sizes

fallback_intermediate_image_sizes

The hook occurs in the following file:

wp-admin/includes/image.php:
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
			'large',
		);

		/**
		 * Filters the image sizes generated for non-image mime types.
		 *
		 * @since 4.7.0
		 *
		 * @param array $fallback_sizes An array of image size names.
		 */
		$fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata );

		$sizes = array();
		$_wp_additional_image_sizes = wp_get_additional_image_sizes();

		foreach ( $fallback_sizes as $s ) {
			if ( isset( $_wp_additional_image_sizes[ $s ]['width'] ) ) {
				$sizes[ $s ]['width'] = intval( $_wp_additional_image_sizes[ $s ]['width'] );
			} else {
				$sizes[ $s ]['width'] = get_option( "{$s}_size_w" );