Yes, that will do it. For example, here's code that will do the whole thing (notice that I'm creating a
$540 \times 540$ GIF, whereas the code in the original post creates a single
$1080 \times 1080$ image):
RandomAngle[] := RandomVariate[UniformDistribution[{0, 2 Pi}]];
RandomDirection[] :=
With[{\[Theta] = RandomAngle[]}, {Cos[\[Theta]], Sin[\[Theta]]}];
img = Block[{r, \[Theta], v, p,
cols = RGBColor /@ {"#252A34", "#FF2E63", "#08D9D6", "#EAEAEA"}},
Table[
Graphics[{Thickness[.0002],
Table[{r = RandomVariate[UniformDistribution[]];
\[Theta] = RandomAngle[];
v = RandomDirection[];
p = {r Cos[\[Theta]], r Sin[\[Theta]]};
{Blend[cols, r], InfiniteLine[p, v]}}, {20000}]},
PlotRange -> 1, ImageSize -> 540],
{8}]
];
Export["animation.gif", img, "DisplayDurations" -> 1/25,
"AnimationRepetitions" -> Infinity]