I've been digging around trying to figure out how to implement a custom URI scheme similar to Flickr's flickr://. However, it
appears they're suffering from the same thing. The image displays correctly, but I receive the error 'Notice: getimagesize(): Read error! in image_gd_get_info() (line 349 of /modules/system/image.gd.inc).' on node save. I've enabled the custom URI on the field and implemented interpolateUrl in my stream wrapper that extends MediaReadOnlyStreamWrapper. It just doesn't want to process my URI scheme correctly in the getimagesize function.

Comments

tsvenson’s picture

Best advise I can give you is to simply look at how other add-on modules doing similar things solves it. You will find an extensive list at http://groups.drupal.org/node/168009.

Also, I notice you are on 1.0-rc3. The 1.x branch has since not only been released in a full 1.0 version, but also a 1.1. Its always a good idea to first check if the problem exists with either the current official version (1.1 in this case) or the current -dev version. Just to make sure the problem exists there too.

Please also not that the 1.x branch is on a feature freeze, no new features will be added to it, just bug fixes. The 2.x branch contains a lot of changes and improvements, especially a wonderful integration with the Views module.

It is possible to get your module to be compatible with both. As I understand it, its not too difficult if you make sure your module works with the Drupal Core file field/Media browser widget combo. Stay away from both the Image and Media fields if possible. Especially the Media field as it is deprecated in 2.x and will disappear at some stage.

devin carlson’s picture

Version: 7.x-1.0-rc3 » 7.x-1.x-dev
Component: Code » Documentation
Status: Active » Closed (duplicate)

The current developer documentation is definitely lacking. As tsvenson mentioned, the best you can do is to check out existing media player and provider modules.

Marking this a duplicate of #1493390: Write plugin development documentation.

devin carlson’s picture

Issue summary: View changes

Grammar