Skip to content

Commit

Permalink
Merge pull request #203 from WordPress/fix/invalid-properties
Browse files Browse the repository at this point in the history
Fix typo to access to the correct image properties
  • Loading branch information
mitogh authored Mar 3, 2022
2 parents 751e4bd + 13002ef commit 7a03620
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/images/webp-uploads/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ function webp_uploads_generate_image_size( $attachment_id, $size, $mime ) {

if ( isset( $metadata['sizes'][ $size ]['width'] ) ) {
$width = $metadata['sizes'][ $size ]['width'];
} elseif ( isset( $sizes[ $size ]['widht'] ) ) {
$width = $sizes[ $size ];
} elseif ( isset( $sizes[ $size ]['width'] ) ) {
$width = $sizes[ $size ]['width'];
}

if ( isset( $metadata['sizes'][ $size ]['height'] ) ) {
$height = $metadata['sizes'][ $size ]['height'];
} elseif ( isset( $sizes[ $size ]['width'] ) ) {
$height = $sizes[ $size ];
} elseif ( isset( $sizes[ $size ]['height'] ) ) {
$height = $sizes[ $size ]['height'];
}

if ( isset( $sizes[ $size ]['crop'] ) ) {
Expand Down

0 comments on commit 7a03620

Please sign in to comment.