Accessing images - scaling

Hi,
is there any way to access image in enonic database without filling out scaling,
or with some parameters that will let me access image in its default size?

I currently having trouble with accessing image that is converted by media_Image.

      mainImage{
        ... on media_Image{
          imageUrl(scale:"block(100,100)" ,type:absolute)
        }
      }

Are there any other methods available (other then “block”)?

Thx

Enonic version: 7.4.0-SNAPSHOT
OS: Windows 10

Indeed there is.
Just use the generic field mediaUrl instead:

      mainImage{
    ... on media_Image{
      mediaUrl(download:false, type:absolute)
    }
  }

Hope this helps!

2 Likes

Also, if you are just looking for some other scaling effects, here are the alternatives: https://developer.enonic.com/docs/xp/stable/runtime/engines/site-engine/image-service#scaling_methods

1 Like