An image file contains pixels. It is the output medium (display, print) that maps image pixels to output pixels. In your particular case, Photoshop can arbitrarily change the image-to-display pixel mapping. It can also completely rewrite the image on the fly to better make use of the image by resizing it. But I don't have to tell you that an image can only be resized so far in either direction (larger, smaller) before image quality degrades.
Open an image in your web browser. Just the image, with no HTML surrounding it. Measure the physical space the image takes in your display. Then change the resolution of your screen and redisplay the image.
If the image does not change size, then the image would have to have resolution information in it. If the physical size of the image does change, however, then it is the display metaphor which imposes a resolution on the image, and the image merely has pixel dimensions.
Now you may be using some less-common image format, where the image file contains some preferred resolution information. But the commonly-used ones on the web (JPEG, PNG, GIF) contain information that tells a renderer that the image file represents a number of pixels horizontally and vertically. They do not constrain the number of pixels per inch, because those image file formats cannot possibly contain sufficient information to tell a renderer to remap image-to-display pixels for every output medium.
But you don't have to take my word for it. The file formats for JPEG, PNG, and GIF are all readily available on the internet. In all three cases, you will find that the format contains information for the dimensions of the pixel grid, and nothing about resolution.
Want the best answers? Ask the best questions: TANSTAAFL!