CKEditor4: the image disappear when I switch from Rich text View to source view
You need to make it clear that images are allowed content.

You may safely declare that images, only certain image attributes, all image styles, and all image classes are allowed content. You do that with the following line of JavaScript:

config.extraAllowedContent = 'img[!src,alt,title,width,height,style](*){*}';


To set these variables, navigate to Configuration → Content authoring → CKEditor and then press edit for the profile you want to configure. Expand Advanced options, and type the JavaScript directly into the textfield Custom JavaScript configuration as shown in the screen shot below (disregard the first line unless you also want to set custom format_tags);



PS: If you Google this, you'll often see the following JavaScript suggested to "fix" the disappering image problem:

config.allowedContent = true;


Yes, it will fix the problem of images disappeearing when you toggle between rich text and source. But it will also make all sorts of content allowed - which is a gaping security hole in your site if you allow untrusted users to create and edit content.  Don't use this quick "fix". Use the solution that uses the extraAllowedContent directive to spell out what shall be allowed (and allow only safe content).