Skip to content

Commit

Permalink
Merge pull request #39 from humanmade/support-direct-size
Browse files Browse the repository at this point in the history
Fix image sizes on non-cropped images
  • Loading branch information
joehoyle committed May 13, 2019
2 parents a20b75e + 35931ce commit d3377f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/frontend/namespace.php
Expand Up @@ -123,7 +123,11 @@ function mangle_images( $content ) {
$new_attrs[] = 'data-gaussholder="' . esc_attr( $placeholder ) . '"';

// Add final size
$size_data = Gaussholder\get_size_data( $size );
$image_data = wp_get_attachment_image_src( $id, $size );
$size_data = [
'width' => $image_data[1],
'height' => $image_data[2],
];
$radius = Gaussholder\get_blur_radius_for_size( $size );

// Has the size been overridden?
Expand Down

0 comments on commit d3377f7

Please sign in to comment.