You can safely use the module with 24V.
The input side shows a red LED, optocoupler and 1k resistor in series. The LED and optocoupler probably have a voltage drop in the neighbourhood of 3.1-3.5 V put together, so for a 12 V input you will get a current of approximately 9 mA-.
For a 24 V input voltage the increased current will cause a slightly higher voltage drop, but even if the voltage drop remains as low as 3.1 V the current will still only be 21 mA. This is well within the rating of the optocoupler (similar optocouplers are often rated for 60 mA) and slightly pushing the rating of the LED (similar LEDs are usually rated for 20 mA) but it will probably be fine.
For extra peace of mind you could connect an additional resistor in series with the input. The "ideal" value (that is, to keep the current identical to that at 12 V) would be 1.3 kΩ, though any small value resistor (above 100 Ω) would be fine.