Simple PHP image formatter