lightbox: Extract image parsing logic from lightbox.open().
lightbox: Extract image parsing logic from lightbox.open().

Moved the parsing logic to a new function `parse_image_data()`.

Part of #14152.

timabbott/zulip,zulip/zulip,showell/zulip,timabbott/zulip,showell/zulip,kou/zulip,shubhamdhama/zulip,kou/zulip,eeshangarg/zulip,eeshangarg/zulip,shubhamdhama/zulip,brainwane/zulip,synicalsyntax/zulip,hackerkid/zulip,hackerkid/zulip,shubhamdhama/zulip,zulip/zulip,hackerkid/zulip,showell/zulip,kou/zulip,showell/zulip,zulip/zulip,showell/zulip,punchagan/zulip,andersk/zulip,rht/zulip,brainwane/zulip,shubhamdhama/zulip,synicalsyntax/zulip,andersk/zulip,andersk/zulip,andersk/zulip,punchagan/zulip,andersk/zulip,synicalsyntax/zulip,kou/zulip,synicalsyntax/zulip,timabbott/zulip,timabbott/zulip,brainwane/zulip,rht/zulip,rht/zulip,hackerkid/zulip,zulip/zulip,brainwane/zulip,hackerkid/zulip,andersk/zulip,brainwane/zulip,zulip/zulip,hackerkid/zulip,punchagan/zulip,rht/zulip,eeshangarg/zulip,rht/zulip,hackerkid/zulip,kou/zulip,shubhamdhama/zulip,synicalsyntax/zulip,brainwane/zulip,punchagan/zulip,shubhamdhama/zulip,timabbott/zulip,timabbott/zulip,punchagan/zulip,showell/zulip,kou/zulip,kou/zulip,synicalsyntax/zulip,eeshangarg/zulip,rht/zulip,zulip/zulip,punchagan/zulip,andersk/zulip,eeshangarg/zulip,zulip/zulip,showell/zulip,punchagan/zulip,brainwane/zulip,eeshangarg/zulip,eeshangarg/zulip,shubhamdhama/zulip,timabbott/zulip,rht/zulip,synicalsyntax/zulip