Hello Mediawerk! Thanks for your reply.
I use flexible content fields because I actually want both image and text be optional an later als add other options.
I just tryed your code and it gives me some syntax error and missing expected ;
Sorry but my PHP skills are not that good yet so I can see the mistakes immidiately.