No, the same image won't run, at least not for all peripherals. There might be some subtle differences, as the silicon is really different. From the application point of view you should be able to port the application fairly easily, assuming your are using the NXP MCUXpresso SDK.
Just create a new project for the K22FX512 with the SDK for it, then copy over your application files. I did that for several projects and that works fine. But I definitely would not tweak the FN512 project to match the FX one: go with a new project an move your files over.