You get a compiler error complaining about the reference (like «Error: uninitialized reference member 'Class::variable'»), right ?
First, img& doesn't mean anything.
A reference must be bound to anther variable when it's constructed.
For example :
void f(void) {
int i = 42;
int& r; // Error: 'r' declared as reference but not initialized
int& r2 = i; // Correct
}
When you are in a class, you must use the initialization-list to bound your reference to something. Like this :
class C {
int& r;
public:
C(int& r_) : r(r_) { }
};
The behaviour is the same with sf::Image.