Most RESTful APIs utilize base64 encoding of files to support POST operations to upload an image. Unfortunately, this is not supported in the Drupal core. Although there is a serializer.normalizer.file_entity.hal service that serializes file entities into HAL JSON, it does not currently work as of 8.3, but is hopefully slated for 8.4.
The \Drupal\hal\Normalizer\FileEntityNormalizer class supports denormalization; however, it does not handle base64 and expects binary data.
There is a Drupal core issue for this problem, which is available at https://www.drupal.org/node/1927648.