The best part to be used is a Ceramic, 470nF, 16 to 50V. You can use higher voltage models but they are bigger.
The model we currently advice is the SR215E474MAR
Its 5mm between legs (not very big).
The first model is electrolytic, not the best option here. The second is good but the voltage too high (400V, maybe too big).
If you use aliexpress, maybe something like this is better (its 5mm pitch):
The administrator has disabled public write access.