Does Gitlab use imgproxy?

What tool does Gitlab use for avatars resize? Is it imgproxy or another one?

We face avatars resize broken and are looking for any reason to cause that. May be it’s just imgproxy isn’t installed right.

Assuming the executable is called imgproxy, then no it doesn’t exist under the /opt/gitlab directory. So I would guess it’s using something else. I have added avatar images without problems and they work fine. Max file size is 200kb, so providing the avatar is less than this, it shouldn’t be a problem for you.

But without knowing more detail related to your issue, it’s difficult to know what exactly your problem is.

Avatars are uploaded fine. The problem is that in Gitlab interface they’re refered with ?width=24, ?width=64 etc parameter. And this resize won’t work, it returns either empty response or an original file.

Mine shown scaled under profile to 158x158 and in the top right hand corner 23x23. Image against commits is 38x38. So not sure why yours is doing that unless it is a browser problem. I don’t see such parameters like yours, so I don’t think that gitlab is the issue here. Either that or the image you are using is the source of the problem. Maybe make it a square image first and then upload it to rule this out.

Here is “the hole” and as you can see in the console, it’s width parameter here.

Yes, and if you look above that line it says width=48, height=48. So I think the problem here is your image is potentially the source of the problem. Max file size is 200kb, so ensure whatever you are uploading doesn’t exceed this under project avatar you can see this before uploading. The same for user avatars is also 200kb limit.

I have images on all of my projects, on my own profile, and they are uploaded perfectly fine and working providing that I have not uploaded larger than 200kb. Also, I upload square images so that I don’t get distortion of an application does attempt to resize in some weird manner.

So I would suggest, check the image you uploaded and make sure it doesn’t exceed 200kb and try again. If still issues, make sure it is a square image, I uploaded one that was 1207x1207 pixels, so square, and it still resizes fine to 48x48, 23x23, etc, etc. And it was less than the 200kb limit.

Hello! I faced with the same issue after update to the latest release.

Its not the filesize issue, because the original file is 48kb. Also it works without url params (without ?width=…) I’ve tried to remove and upload the avatar again. And same thing with other images (projects images, other avatars etc.).

Our Gitlab ee is running on Ubuntu 18.04 (just a basic installation with apt).

@softshape did you find a solution?

Yes. We’ve simply disable image scaling as described on Image scaling | GitLab. It’s not really useful, after all, as Gitlab also does rescale avatars in the browser.

1 Like