create new image style using javascript
clive would suggest to create a new Formatter for image type fields that would allow in the render display to select a image style for the image link.

At least i could do "In the field formatter settings you can tell the image to render in one style, but link through to the full image" and clean the code to:

(function ($, Drupal) {

  Drupal.behaviors.fancyBoxInit = {
    attach: function (context, settings) {
      $('[data-fancybox="gallery"]', context).once('fancyBoxInit').fancybox({
        buttons: [
          'close'
        ]
      });
    }
  }
})(jQuery, Drupal); 


with in image-formatter--media--image--field-media-image.html.twig

   {% if url %}
      &lt;a data-fancybox="group" href="{{ url }}"&gt;{{ image }}&lt;/a&gt;
    {% else %}
      {{ image }}
    {% endif %}