# gd_edit_image_support()

URL: https://chugunov.pro/api-wordpress/functions/gd_edit_image_support/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.9.0.

> Устаревший элемент. Помечен устаревшим с версии 3.5.0.

## Сигнатура

```php
gd_edit_image_support( string $mime_type ): bool
```

## Описание

См. alsowp_image_editor_supports()

## Параметры

- `$mime_type` `string` — обязательный

## Возвращаемое значение

`bool`

## Исходный код

Файл: `wp-includes/deprecated.php:3331`

```php
function gd_edit_image_support($mime_type) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_image_editor_supports()' );

	if ( function_exists('imagetypes') ) {
		switch( $mime_type ) {
			case 'image/jpeg':
				return (imagetypes() & IMG_JPG) != 0;
			case 'image/png':
				return (imagetypes() & IMG_PNG) != 0;
			case 'image/gif':
				return (imagetypes() & IMG_GIF) != 0;
			case 'image/webp':
				return (imagetypes() & IMG_WEBP) != 0;
			case 'image/avif':
				return (imagetypes() & IMG_AVIF) != 0;
			}
	} else {
		switch( $mime_type ) {
			case 'image/jpeg':
				return function_exists('imagecreatefromjpeg');
			case 'image/png':
				return function_exists('imagecreatefrompng');
			case 'image/gif':
				return function_exists('imagecreatefromgif');
			case 'image/webp':
				return function_exists('imagecreatefromwebp');
			case 'image/avif':
				return function_exists('imagecreatefromavif');
		}
	}
	return false;
}
```

## История изменений

- 3.5.0 — Deprecated. Use wp_image_editor_supports()
- 2.9.0 — Introduced.

## Связанные

Использует: [`_deprecated_function`](https://chugunov.pro/api-wordpress/functions/_deprecated_function/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/gd_edit_image_support/
