Added mediaFolder support to rotateImg