How to get rendered image paths from the ElementAPI?
Rather than calling getRawContent(), just explicitly cast your Rich Text field data into a string:

'summary' =&gt; ($entry-&gt;summary ? (string) $entry-&gt;summary : false),