[TASK] RTE: Extract JavaScript from select image php controller