mgsisk / webcomic

Comic publishing power for the web. Turn your WordPress-powered site into a comic publishing platform with Webcomic.
http://wordpress.org/plugins/webcomic
GNU General Public License v2.0
110 stars 29 forks source link

Add media from url #142

Closed metakermit closed 9 years ago

metakermit commented 11 years ago

Hi,

would it be possible to enable attaching webcomics as a url and not by uploading them to our site? The media dialog menu does allow it, but Webcomic simply ignores the image if it didn't come from the locally hosted media library.

I would like to use imgur for image hosting, as managing my whole webcomic collection in a nice resolution takes up a lot of space and I don't have nearly the same CDN capacity as they do, so it seems like a logical choice (in a same way I would use Youtube for video hosting, instead of uploading it on my site). As an example, The Oatmeal uses S3 to host its images, showing that professional webcomics also rely on these methods.

Anyway, I can achieve this funcionality by posting the image embed code inside the webcomic post body, giving me a similar effect, but that's very hacky, as the theme has to be severely edited to make the accompanying post body replace the webcomic's "official" image container. It would be much better if I could do it properly from the Webcomic add media dialog and have it show nicely on my theme.

I see how this could be hard to implement across all the thumbnails, poster prints etc., but I would be really happy to at least have it show up in single.php and home.php, as a quick solution, as this is the only functionality I will require in the near future (and even though this might not be the case for everyone, some url-image support is better than nothing).

mgsisk commented 11 years ago

Thanks for the feedback! While CDN's are great and I'm marking this as a potential Enhancement I have several concerns about attempting to implement such a feature:

  1. WordPress—and, by extension, Webcomic—already supports the use of a proper CDN; at least one site (warning: possibly NSFW) using Webcomic uses a CDN to deliver it's images, and there are number of CDN plugins for WordPress that most likely work with Webcomic. Webcomic relies on WordPress for basically all of it's image-related features, so it can probably benefit from any CDN plugin that knows how to deal with WordPress media. Here's one that works with S3.
  2. Because Webcomic is so tightly integrated with WordPress' media features supporting URL's (instead of media objects) would require a rewrite of a good portion of the plugin, which is something I am admittedly not keen on doing. Webcomic would have to start duplicating functionality WordPress provides by default (for media objects, at least), which is something I continue to try and move away from.
  3. Using services like Imgur and Flickr as a CDN is semi-questionable. Flickr in particular specifically states that using it as a replacement for a CDN is against community guidelines. Imgur apparently had verbage to this effect some time ago, but I couldn't find anything in their latest TOS specifically prohibiting it so they may not care these days.
metakermit commented 11 years ago

Thanks for the quick reply!

Yes, I did some reading on the topic now. I found an extensive list of CDN's supported by Wordpress, most interesting of which seems to be Photon, hosted for free by Wordpress.com. The issue with most of these is that you still need to have the media hosted locally - which raises the web hosting costs from hosting only text, to hosting images too (not negligible when you're only beginning and doing it for fun).

As far as imgur's policy is concerned, I'm not an expert here, but I read that they are only against people hotlinking webpage elements (banners, icons etc.) and not the "useful" content itself, as that's their main product - motivating people to aggregate interesting things on their site, which they in term also offer on their homepage.

Anyway, I'll think about this to find some solution - either work around this by using CSS to just expose the webcomic post that supports embedded images or go with hosting my own media and Photon as long as I have free space and try to think of some solution by then.

If you by any chance, during your coding, see that it is possible to catch the add media dialog's url (when a user enters that instead of selecting a media object) and just support it for rendering the actual comic without all the other fancy features, that would be great.

screen shot 2013-05-29 at 1 02 20 pm