use data-width/-height attributes if set, remove unused code from the backend