source/php/Module/Image/Image.php
public function maybeCropImage($data)
    {
        if (!$data['mod_image_crop']) {
            return $data['mod_image_image']['sizes'][$data['mod_image_size']];
        }

        $imageSrc = wp_get_attachment_image_src(
            $data['mod_image_image']['ID'],
            apply_filters('Modularity/image/image',
                municipio_to_aspect_ratio('16:9', array($data['mod_image_crop_width'], $data['mod_image_crop_height']))
            )
        );

        return $imageSrc[0];
    }
public function maybeCropImage($data)
    {
        if (!$data['mod_image_crop']) {
            return $data['mod_image_image']['sizes'][$data['mod_image_size']];
        }

        $imageSrc = wp_get_attachment_image_src(
            $data['mod_image_image']['ID'],
            apply_filters('Modularity/image/image',
                municipio_to_aspect_ratio('16:9', array($data['mod_image_crop_width'], $data['mod_image_crop_height']))
            )
        );

        return $imageSrc[0];
    }
public function maybeCropImage ( $ data ) { if ( ! $ data [ 'mod_image_crop' ] ) { return $ data [ 'mod_image_image' ] [ 'sizes' ] [ $ data [ 'mod_image_size' ] ] ; } $ imageSrc = wp_get_attachment_image_src ( $ data [ 'mod_image_image' ] [ 'ID' ] , apply_filters ( 'Modularity/image/image' , municipio_to_aspect_ratio ( '16:9' , array ( $ data [ 'mod_image_crop_width' ] , $ data [ 'mod_image_crop_height' ] ) ) ) ) ; return $ imageSrc [ 0 ] ; }
Create a cropped image if needed
@return string
Create a cropped image if needed