Port of miniphoto snippet from Modx evo to Modx revo