Use the correct width value for pictures uploaded from Media.

Fix #981