Open IvanPr opened 7 years ago
Hi! Does this happen when rwp_img()
is unable to create an <img>
element?
Yes, exactly. For example, when several image-sizes are specified in $rwp_settings but the image-sizes itself does not exist... say, were not re-generated after changing an image size...
I haven't tried this, but what if you try something like this:
<?php
add_filter( 'rwp_edit_generated_element', function( $element ) {
if ( $element == '' ) return false;
return $element;
} );
?>
The rwp_img( $image_id, $rwp_settings); returns "" if the requested $rwp_settings produce no valid scrset of image-sizes [the image-sizes were not re-generated].
I would expect the FALSE result instead.