Implement size autodetection if one of the width and height