Add logic to php resize functions.