You don’t really give enough information about what you want to give you an answer.
Is the image supposed to be included among text, so that the text wraps around it, or is any text around it going to be either above or below the image?
Do you want the image aligned to the left, right, center, top, bottom, or some combination of those things?
When you say “link a text” to the image, what do you mean? Do you perhaps want a caption for the image to be centered below it? Or something else? Do you want a border of some sort around both of them?
Also, the second line in this code you provided isn’t valid:
<<set _picPos = "left: 300px; top: 313px;">>
<img src="image.jpg"_picPos + 'width: 125px; height: 125px; position: absolute;'">
I assume you meant to write this:
<<set _picPos = "left: 300px; top: 313px;">>
<img src="image.jpg" @style="_picPos + 'width: 125px; height: 125px; position: absolute;'">
As for combining your “Solution 1” and “Solution 2”, you can’t. The absolute positioning plus setting the “left” position vs the align="left"
code are two mutually exclusive settings. You can do one or the other, but not both, because they contradict each other.
You’ll need to describe exactly how you want to position the image (plus the caption, if there is one) relative to the rest of the text before someone can answer your question.
You might just want to do a Google search on “CSS align image” or something like that for help with the CSS you’re trying to implement. That should help you find pages like “CSS Layout - Horizontal & Vertical Align” or “How to Align and float images with CSS” which might provide the kind of information you’re looking for.
Hope that helps!