According to RFC3986:
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
So no space-encoding required here.
Only Appendix C talks about whitespace but only talks about URIs that are placed e.g. in plain text where space can be used to seperate different urls. This is imho not the case if placed in src
attributes.
Nevertheless nearly every tutorial about "url encoding" starts by telling that space is encoded by %20
. (Or + or mixed combinations of both or ...)