i need something like
<img attribute1='value' src='sites/default/files/styles/thumbnails/**pic_0**.jpg'>
i have to use rewrite result because i need attribute1. but i have no idea how to get src of image.
[filename] is not always same with file path. -for example
[filename] is pic.jpg but file path is pic_0.jpg- .
how can i get pic_0.jpg or http://example.com/sites/default/files/styles/thumbnails/pic_0.jpg?