If that does not work ...
https://superuser.com/questions/1018877/ubuntu-mount-image-file-with-r-w-permission
sudo fdisk -l raspberry_pi.img
Multiply sector size in bytes (e.g. 512) with sector start of partition you want to mount
Example
Disk raspberry_pi.img: 7.3 GiB, 7826571264 bytes, 15286272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbeb1a7ff
Device Boot Start End Sectors Size Id Type
raspberry_pi.img1 8192 93813 85622 41.8M c W95 FAT32 (LBA)
raspberry_pi.img2 94208 15069183 14974976 7.1G 83 Linux
512 * 94208 = 48234496
Create sdcard
folder
sudo mkdir /media/sdcard
sudo mount -o loop,rw,sync,offset=48234496 raspberry_pi.img /media/sdcard
Finally unmount
sudo umount /media/sdcard