WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #43458, comment 2


Ignore:
Timestamp:
03/02/2018 02:05:39 PM (22 months ago)
Author:
remyvv
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43458, comment 2

    initial v1  
    11I have looked into this issue and figured out this is occurs due too a omission of `IMAGETYPE_ICO` in the `$displayable_image_types` inside the function `file_is_displayable_image`.
    2 Because `wp_generate_attachment_metadata` calls this function to check if it should generate the metadata for an upload, the metadata is not generated for `.ico` files.
     2Because `wp_generate_attachment_metadata` calls this function to check if it should generate the metadata for an upload, the metadata is not generated for `.ico` files. And such `wp_get_attachment_image` outputs width and height as `1`
    33
    44The attached patch fixes this.