If you have syntax like : fileadmin/_processed_/csm_0001_2137573116.jpg”;
for that following script will do the trick
$string = "fileadmin/_processed_/csm_0001_2137573116.jpg"; $quoteString = \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($string);
After print of that result Output will look like below
it will add addtional quote around the string.
I hope it will work for you 😉 Njoy… 🙂
If you have any queries, please do not hesitate to contact me at Jainish Senjaliya