I think most people feel like this some time or another.
First thing is, if you don't have it in the house, you can't eat it. Try not to buy things you know are going to tempt you. So if you do lose motivation, it's not too easy to go off plan.
I always find planning my weekly meals to be a good motivator, looking at new recipes to try, mixing up your meals instead of having the same things over and over, keeps food interesting and you'll be less likely to crave off plan foods.
I have a tumblr that helps keeps me motivated, I follow lots of weight loss blogs, or people who are v into health/fitness and just a scroll down my dashboard and that keeps me motivated! Lots of slimming world people on there too.
Try looking online at clothes you'd buy if you were slimmer, things you wouldn't wear now but you would love to. Thats usually a good reminder why you are doing it!!
I also find exercise really motivates me, because it's such hard work slogging 25st around at the gym, the last thing I want to do is waste it by having a creme egg haha. Plus it makes you feel great, fills you with endorphins, and gives you lots of energy! The last thing you want to do is spoil it. Maybe increasing your exercise levels would help.
Just a few ideas off the top of my head

xx