Preserve attributes

The modification allows to preserve the following attributes :
- Resize Type
- maxWidth / width
- maxHeight / height