locked
FFImageLoading - Asset Catalog RRS feed

  • Question

  • User129559 posted

    I cannot seem to load any images that are in an Asset Catalog. This is using the Xamarin Forms nuget package, Forms version 2.0+.

    I have included a sample project using FFImageLoading.Forms 2.0.7.1.

    I can show the images if using the standard Image class, with or without Bindings, but cannot do so using CachedImage. CachedImage does work on a BundleResource file.

    This is obviously a trivial example, not anything like what I plan to use the FFImageLoading for. ListView scroll performance is much better with your library, but I cannot use the images I ship with the application in the asset catalogs without some assistance. @DanielL

    Tuesday, March 8, 2016 10:46 PM

Answers

  • User179286 posted

    Why put you the images in your Assets and not in Resources/DrawAble? From there CachedImage should be able to load it just with the image name

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 9, 2016 7:12 AM
  • User179286 posted

    Loading from Embedded Resources also works.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 9, 2016 4:27 PM
  • User2773 posted

    @AdamMeaney There was an issue about that. Fixed here (should be working fine now): https://github.com/molinch/FFImageLoading/commit/dc23ed4f34ad6865410718b8aaf7921e370813a1

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, March 11, 2016 7:00 PM

All replies

  • User179286 posted

    Why put you the images in your Assets and not in Resources/DrawAble? From there CachedImage should be able to load it just with the image name

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 9, 2016 7:12 AM
  • User129559 posted

    They do load fine when not in Asset Catalogs, I was just trying to see if there is a way to do it as we like Asset Catalogs. No real reason, just felt like the way to go.

    If it cannot be done, we will move them out to somewhere we can manage from, but I thought Asset Catalogs were how iOS likes to manage images.

    Wednesday, March 9, 2016 2:21 PM
  • User179286 posted

    Loading from Embedded Resources also works.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, March 9, 2016 4:27 PM
  • User129559 posted

    I guess for now the answer is don't use Asset Catalogs for this purpose.

    Thursday, March 10, 2016 4:16 PM
  • User15966 posted

    If you specify the ImageSource.CompiledResource then it will load from the AssetCatalog

    Friday, March 11, 2016 3:21 PM
  • User2773 posted

    @AdamMeaney There was an issue about that. Fixed here (should be working fine now): https://github.com/molinch/FFImageLoading/commit/dc23ed4f34ad6865410718b8aaf7921e370813a1

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, March 11, 2016 7:00 PM