Fabulous
API Reference
3.0 preview
3.0 preview
  • Welcome
  • Get Started
  • Samples & Tutorials
    • Samples
    • Videos
  • Basics
    • MVU
    • Application state
      • Commands
      • State validation
    • User interface
      • Widgets and modifiers
      • Styling
      • Animations
    • Testing
    • Error monitoring
  • Advanced
    • Saving and Restoring app state
    • Performance optimization
    • Composing larger applications
      • Splitting into independent MVU states
      • Integrating commands
      • Communicating between MVU states
  • Architecture
    • Attribute definitions
    • Virtualized collections
    • Using nightly builds
  • Xamarin.Forms
    • Get Started
    • User interface
      • Custom controls
      • Effects
      • Navigation
      • Pop-ups
    • Extensions
      • FFImageLoading
      • OxyPlot
      • SkiaSharp
      • VideoManager
      • Xamarin.Forms.Maps
  • .NET MAUI
    • Get Started
    • Advanced
      • Optimizing performances
        • Profiling Fabulous apps
  • Avalonia
    • Get Started
Powered by GitBook
On this page
Edit on GitHub
  1. Xamarin.Forms
  2. Extensions

FFImageLoading

PreviousExtensionsNextOxyPlot

Last updated 1 year ago

The FFImageLoading plugin allows you to cache images as opposed to wasting time and memory with the built-in Image view. Using FFImageLoading, you have an easy way to cache images in your Fabulous.XamarinForms application.

FFImageLoading was created by Daniel Luberda and Fabien Molinet. The original project can be found in .

The nuget implements a view component for the type .

Source: The FFImageLoading github project by Daniel Luberda and Fabien Molinet

Installation

To use Fabulous.XamarinForms.FFImageLoading, you must:

  1. Add this line to your platform specific projects (AppDelegate.fs, MainActivity.fs, MainPage.xaml.cs, etc) before you use FFImageLoading:

  • If you’re using Android:

FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer = Nullable [true]/[false])
  • If you’re using non-Android platforms:

FFImageLoading.Forms.Platform.CachedImageRenderer.Init()
  1. Use CachedImage in your view function. Here is a simple example of using CachedImage to display a scenic image:

View.CachedImage(
  source = ImagePath "http://loremflickr.com/600/600/nature?filename=simple.jpg",
  height = 600.,
  width = 600.
)

Performance considerations

Add a reference to across your whole solution. This will add appropriate references to your platform-specific Android, iOS, UWP, WPF etc projects too.

Use FileImageSource, UriImageSource or FFImageLoading’s EmbeddedResourceImageSource instead of StreamImageSource or ImageSource.FromResource to ensure the images are cached properly.

this NuGet package
Read more here on the FFImageLoading wiki
this github repository
Fabulous.XamarinForms.FFImageLoading
CachedImage