Provider documentation
None
Render the original source URL without provider transformations.
Setup
Install the framework package and the core package for the provider import:
npm install @desource/image @desource/image-svelte Save this as image.config.ts beside your example component. Replace sample domains and identifiers with
your own.
import type { ImageConfig } from '@desource/image';
import { noneProvider } from '@desource/image/providers/none';
export const imageConfig = {
provider: 'none',
providers: {
none: noneProvider()
}
} satisfies ImageConfig; Registering this provider makes it the default for the configured components. To mix services, register each
provider and set provider="none" on the image that should use this one.
Image source
Use any image URL that the browser can load.
/img/hero.jpgUsage
The example uses the shared configuration above and the Svelte image component.
<script lang="ts">
import { Image, setImageConfig } from '@desource/image-svelte';
import { imageConfig } from './image.config';
setImageConfig(imageConfig);
</script>
<Image
src="/img/hero.jpg"
alt="Sample image" width={800} height={500}
/>Provider options
This provider needs no service-specific factory options. Register the factory with no arguments.
Pass shared defaults such as screens, domains, aliases and presets to the image configuration. Pass provider-specific defaults as modifiers in the provider factory.
Modifiers
The provider returns src unchanged. Width and height can still describe the rendered element, but quality, format, crop and other modifiers do not transform its bytes.
Set dimensions on the component and pass service-specific operations through modifiers, as shown
above. See the provider source for exact mappings and the service documentation for accepted values.
Provider notes
- Use this for SVG logos, already optimized assets, or URLs signed by a server.
- Responsive markup cannot create new image variants when every candidate resolves to the same URL.