Using chapter images from external links
Instead of limiting the user to only use the images uploaded to the storage directory of the server. It would be nice to have an option to use external images from imgur etc. As long as the link is something like xxx.com/01.png.
It doesn't have to be api or anything, just a second upload option where the user simply choose the number of images for the chapter then manually input the external links for those images.
In cases where you want to avoid as much load as possible on your server resources, this would be an efficient way to do it.
Seems cool.
Just to clarify if I understood, each chapter should have 2 additional fields:
- An input field with the url format (with sprintf to add padding of zero). Example input
https://example.com/chapter123/%03d.png - An input field for the number of pages: example 3
This will return in the API pages links section of the chapter those urls
https://example.com/chapter123/001.png
https://example.com/chapter123/002.png
https://example.com/chapter123/003.png
Is this ok?
Seems cool. Just to clarify if I understood, each chapter should have 2 additional fields:
- An input field with the url format (with sprintf to add padding of zero). Example input
https://example.com/chapter123/%03d.png- An input field for the number of pages: example 3
This will return in the API pages links section of the chapter those urls
https://example.com/chapter123/001.png https://example.com/chapter123/002.png https://example.com/chapter123/003.pngIs this ok?
That's one way to do it. That is, If you have the liberty to format your urls the way you want.
However with a service like imgur (and many image hosting services), you don't get to format your urls like that, instead you're given a random string something like 'https://i.imgur.com/ui2TIKu.jpeg'
So I see two convenient approaches to this (for my use case).
1- Implement API (for imgur and other image hosting services).
This approach is very similar to what cubari.moe is already doing, just paste the imgur album link (let's say it's a 18-page chapter) and it automatically grabs all 18 images from a single imgur album link and reflects it on their site reader.
2- Allow user to modify image urls of new/existing chapters.
After adding images using the normal way. All images have their original links 'xxx.com/storage/comics/mangatitle/chapter-number/x.png' in a text field positioned right under the filename and next to the thumbnail. Whatever url is in that field is reflected on the reader after publishing, user can choose to ignore it and therefore it stays in the server storage and publish it, or modify it to whatever url they choose. And it is also editable for existing chapters by clicking the edit chapter > modifying the url field, clicking update or whatever approach you choose.
To summerize the second approach, an option to modify image urls of any chapter at any given time.
I'm not much of a developer, but I imagine the second option would be easier to implement?
And sorry if it's a tall order 😅
Seems cool. Just to clarify if I understood, each chapter should have 2 additional fields:
- An input field with the url format (with sprintf to add padding of zero). Example input
https://example.com/chapter123/%03d.png- An input field for the number of pages: example 3
This will return in the API pages links section of the chapter those urls
https://example.com/chapter123/001.png https://example.com/chapter123/002.png https://example.com/chapter123/003.pngIs this ok?
That's one way to do it. That is, If you have the liberty to format your urls the way you want.
However with a service like imgur (and many image hosting services), you don't get to format your urls like that, instead you're given a random string something like 'https://i.imgur.com/ui2TIKu.jpeg'
So I see two convenient approaches to this (for my use case).
1- Implement API (for imgur and other image hosting services).
This approach is very similar to what cubari.moe is already doing, just paste the imgur album link (let's say it's a 18-page chapter) and it automatically grabs all 18 images from a single imgur album link and reflects it on their site reader.
2- Allow user to modify image urls of new/existing chapters.
After adding images using the normal way. All images have their original links 'xxx.com/storage/comics/mangatitle/chapter-number/x.png' in a text field positioned right under the filename and next to the thumbnail. Whatever url is in that field is reflected on the reader after publishing, user can choose to ignore it and therefore it stays in the server storage and publish it, or modify it to whatever url they choose. And it is also editable for existing chapters by clicking the edit chapter > modifying the url field, clicking update or whatever approach you choose.
To summerize the second approach, an option to modify image urls of any chapter at any given time.
I'm not much of a developer, but I imagine the second option would be easier to implement?
And sorry if it's a tall order 😅
I think the first one is easy. The only problem is that each image provider has is own "album" style, so it would works only for specific image hosting, in this case imgur. It would download the images server side (to provides zip and pdf features) but will (optionally) use the original urls in the API page list.
The second one, instead, would probably require works on the table with images, which is an external library. I have to check it, but I think it is not hard just adding a button like "set external url" near each picture which if set it would be used as image url everywhere. There is only one problem: wouldn't be tedious setting 100 urls manually for a 100 pages chapter? I think it would be better adding a "bulk set external urls" button too with just a big input box where you can put the urls (one page per line) all together
I think the first one is easy. The only problem is that each image provider has is own "album" style, so it would works only for specific image hosting, in this case imgur. It would download the images server side (to provides zip and pdf features) but will (optionally) use the original urls in the API page list.
The second one, instead, would probably require works on the table with images, which is an external library. I have to check it, but I think it is not hard just adding a button like "set external url" near each picture which if set it would be used as image url everywhere. There is only one problem: wouldn't be tedious setting 100 urls manually for a 100 pages chapter? I think it would be better adding a "bulk set external urls" button too with just a big input box where you can put the urls (one page per line) all together
Yeah I think what you proposed for imgur is sufficient. And imgur while not perfect, proved to be maintaining images for 5 years at least, in my use case that is. So it'd be worth the effort.
Your 'bulk set external urls' proposal is brilliant, I didn't think it was possible. It's definitely much better than manually setting multiple urls. And if you think about it manga is really just bunch of images stacked up together, so pasting all urls in one big input box, with the right constraints to make sure the user don't mess it up, works well.
ImgBB is a way better host (it support uncompressed images support up to 32mb), and links don't die.
PS: it also support folder links.
Side note: the support for imgur and imgbb could be ported from other open source projects (like cubari.moe official repo)
Has it been implemented? It would be interesting
Has it been implemented? It would be interesting
Not yet
Has it been implemented? It would be interesting
Not yet
Ok, thanks for the quick reply.