| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 35 | public function resolve(ProductImageInterface $image): string |
||
| 36 | { |
||
| 37 | $pathToReadFile = $this->package->getUrl($image->getPath()); |
||
|
|
|||
| 38 | $targetUrl = $this->filterService->getUrlOfFilteredImage($pathToReadFile, $this->imageFilterName); |
||
| 39 | $data = file_get_contents($targetUrl); |
||
| 40 | $type = pathinfo($image->getPath(), \PATHINFO_EXTENSION); |
||
| 41 | |||
| 42 | return 'data:image/' . $type . ';base64,' . base64_encode($data); |
||
| 43 | } |
||
| 45 |