Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #48712


Ignore:
Timestamp:
11/19/2019 08:04:06 AM (5 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #48712

    • Property Component changed from General to Media
  • Ticket #48712 – Description

    initial v1  
    11I have this code in a custom plugin of mine:
    2 
    3     ''$screens_attach_id = wp_insert_attachment( $attachment, $file );
     2{{{
     3    $screens_attach_id = wp_insert_attachment( $attachment, $file );
    44    require_once( ABSPATH . 'wp-admin/includes/image.php' );
    55    $attach_data = wp_generate_attachment_metadata( $screens_attach_id, $file );
    6     wp_update_attachment_metadata( $screens_attach_id, $attach_data );''
     6    wp_update_attachment_metadata( $screens_attach_id, $attach_data );
     7}}}
    78
    89It worked until now, however, in the current version, wp_generate_attachment_metadata is breaking execution without any error in any log, when called for some (large?) images. Example image: https://i.ibb.co/k1FVrCh/apex-jpg5dd30be89f32b-1024x603.jpg