My file is located under /images/donkey.jpg, so in that case, don't forget to add .images.

C#:
  1. var assemblyName =  typeof(BinaryAssetFileDataProviderTest).Assembly.GetName().Name;
  2. var str = typeof (BinaryAssetFileDataProviderTest).Assembly.GetManifestResourceStream(assemblyName + ".images." + "donkey.jpg");
  3. var blob = new byte[str.Length];
  4. str.Read(blob, 0, (int)str.Length);
  5. var size = (int)str.Length;
  6. str.Close();