Hi Anton!
We discovered that the problem was that we must validate that before calling the function get_attachment_image_src for the parameter $attachment_id that it is an integer (or convert it to integer) and that the parameter to pass is not empty.
thank you!