Reset default rect size
refactored embedded img code