Yes you can find answers elsewhere searching for hibernate + linux + file but I post the super-short answer:
sudo filefrag -v /swapfile |grep " 0:"| awk '{print $4}'
in my system for example it gives: 57643008..
(for the sake of curiosity this is the offset of the swap file the file system...)
put away this number (we will use it later) and find another number:
lsblk -o UUID,MOUNTPOINT
in my system for example it gives:
0ec9c519-c7ec-43e3-b812-967d81842458 /home
eb343dae-82e4-4155-9026-18c891d3252b /
since the swap file is in / it is this the UUID of interest. Then add to /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=eb343dae-82e4-4155-9026-18c891d3252b resume_offset=57643008"
sudo update-grub
and you are done (use your UUID and OFFSET numbers obviously). Test it with the command:
sudo hibernate
PS: according to some kernel docs that I can't find now, it should be sufficient a swap file of half of your RAM size or less (they say 2/5). Check with: cat /sys/power/image_size