I spend quite a lot of time drawing images for my research projects, I really don't like that when the editor publish these images I lose the rights on them. So usually I release them on the web under creative commons licence CC-BY before submitting the manuscripts where I used them. I was wondering if this procedure safeguards my intellectual property on the images and the possibility to be reused.
As long as you still have copyright you can put them under any legal license that you choose. You can later give a different (non-exclusive) license to a journal, if necessary. Editors may not like it that they don't have exclusive rights, but they might swallow it if the overall work is good. As long as they aren't excluded from doing things they feel they need to do you should be fine.
For example, if you use a CC "no-commercial use" license, then the journal may want and need a less restrictive one. But CC-BY alone should be acceptable, and if not, you should wonder why.
But at the end of the day, what they publish is up to them, and what you do with your own copyrights is up to you. Just be sure that they understand that they aren't getting full copyright transfer and that a license is already in place.
It would be on you, not the publisher, if you try to give an exclusive license to work that already has a less restrictive license available to everyone. Anyone taking advantage of your license, who the publisher went after, would put you in the cross-hairs. I think the law (many places) will judge that you can't withdraw a license once given. That is, you can't unilaterally break a contract. "