add inline-image preview function