STUPIDROBOT - fix the problem of getting wrong image size when resizing
This bug is weird, I guess it is because the image is not loaded yet, so now I
resize image only after it is fully loaded