Skip to content

[Bug]: imagecreatefromstring(): Data is not in a recognized format #20412

Description

@liviuconcioiu

Describe the bug

I think I managed to reproduce this bug https://reports.phpmyadmin.net/reports/view/89249

Warning in ./libraries/classes/Image/ImageWrapper.php#95
imagecreatefromstring(): Data is not in a recognized format

It happens when the structure of the image column is changed and rows contain a filename for example and also a image.

How to Reproduce

  1. Go to https://demo.phpmyadmin.net/QA_5_2/index.php?route=/&server=1 (MariaDB)
  2. Run
CREATE DATABASE IF NOT EXISTS `test`;

CREATE TABLE IF NOT EXISTS `test`.`test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image` longblob NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT IGNORE INTO `test`.`test` (`id`, `image`) VALUES (1, 0x0);
INSERT IGNORE INTO `test`.`test` (`id`, `image`) VALUES (2, 0x89504e470d0a1a0a0000000d4948445200000001000000010802000000907753de0000000f494441547801010400fbff00ffffff05fe02fe49666e2b0000000049454e44ae426082);
  1. Go to Structure and change image with:

Media type -> image/png
Browser display transformation -> Inline (image/png): Inline

  1. Browser table
  2. See error

Screenshots

08.08.2026_15.13.01_REC.mp4

Database Server

MariaDB

phpMyAdmin version

5.2.4-dev, 6.0.0-dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA problem or regression with an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions