Topic: Why can't I upload this art from pixiv? I don't know if it's the wrong file type or if it's too big or something else

Posted under General

The link to the post is
https://www.pixiv.net/en/artworks/62817590#manga
The direct link I used to upload is
https://i.pximg.net/c/600x1200_90_webp/img-master/img/2017/05/09/08/04/03/62817590_p0_master1200.jpg
It returned this error message
error: ActiveRecord::RecordInvalid - Validation failed: File ext is invalid (only JPEG, PNG, GIF, and WebM files are allowed, File size is too large. Maximum allowed for this file type is 0 MiB
What can I do in this this situation and future similar situations? I'm new to uploading

watsit said:
https://i.pximg.net/c/600x1200_90_webp/img-master/img/2017/05/09/08/04/03/62817590_p0_master1200.jpg
is the resized preview image. The direct link is actually
https://i.pximg.net/img-original/img/2017/05/09/08/04/03/62817590_p0.jpg
Make sure you click on the image to expand it to full size, then copy the link to the full size image.

Otherwise, I'm not sure why it's erroring when you try to upload it. It seems to be a normal jpg.

maybe the "webp" in the URL is fuckin it up

It's because the file type is actually wepb, not jpeg as the "extension" suggests. If you try to save it, then you'll see it's a webp.

To fix this, first of all you should use the link to the original file, the one that Watsit provided and not a compressed preview.

ebea57 said:
It's because the file type is actually wepb, not jpeg as the "extension" suggests. If you try to save it, then you'll see it's a webp.

I did, and it still shows as jpeg to me. Specifically:

$ file downloads/62817590_p0_master1200.jpg 
downloads/62817590_p0_master1200.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment length 16, baseline, precision 8, 900x800, components 3

This actually checks the contents of the file, it doesn't care about the file extensions. Real webp shows properly, even with an incorrect extension:

$ file test.jpg
test.jpg: RIFF (little-endian) data, Web/P image, VP8 encoding, 1024x1024, Scaling: [none]x[none], YUV color, decoders should clamp

watsit said:
I did, and it still shows as jpeg to me. Specifically:

$ file downloads/62817590_p0_master1200.jpg 
downloads/62817590_p0_master1200.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment length 16, baseline, precision 8, 900x800, components 3

This actually checks the contents of the file, it doesn't care about the file extensions. Real webp shows properly, even with an incorrect extension:

$ file test.jpg
test.jpg: RIFF (little-endian) data, Web/P image, VP8 encoding, 1024x1024, Scaling: [none]x[none], YUV color, decoders should clamp

That's because pixiv showed you jpeg instead of webp. If you look at your image URL, you'll notice it's different from the one posted by OP. It doesn't have _webp part.
It seems pixiv uses webp only with certain browsers, not sure which ones. I forgot that I have browser extension that gets around pixiv hotlink protection, so I could just open the direct link to that webp image and download it without going to pixiv.

  • 1