Add new argument to function getImages

1st: The function will return the product attribute id's with the list.
2nd: If product attribute id is passed to the function it will return
only the image id of the given attribute.