Rewrite the dimensions part of the URL based on the arguments provided