Compressing a file will reduce the file size while keeping the dimensions and resolution the same.
To compress a photo file size in Photoshop you can use the Export function which will create a new smaller file without changing the original
From the dropdown menu choose: File -> Export -> Export As…
The “Export As…” function will bring up the dialog box as shown below. Under File Settings lower the quality percentage as much as you need to reach the file size you want. Under Image Size and Canvas Size specify the size of the output image. Click Export All and save it as new file in a different folder or using a different name to prevent Photoshop from overwriting your original.