# Dynamic loading of images and a "404" image

**URL:** <https://forum.inductiveautomation.com/t/dynamic-loading-of-images-and-a-404-image/53185>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 17, 2021, 2:30pm UTC](https://forum.inductiveautomation.com/t/dynamic-loading-of-images-and-a-404-image/53185 "2021-11-17T14:30:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dis](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dis](https://forum.inductiveautomation.com/u/dis)\
**Post date:** [November 17, 2021, 2:30pm UTC](https://forum.inductiveautomation.com/t/dynamic-loading-of-images-and-a-404-image/53185/1 "2021-11-17T14:30:04Z")

</div>

I have a screen set up so that it passes the production line in as a parameter. This parameter is then used in an image tag to create the link to the image:

```auto
[default]{1}/SKU

```

1 = {view.params.Name}

I then have a transform that does the following

```auto
concat({view.params.dir},{value},{view.params.filetype})

```

{view.params.dir} = /system/images/products  
{value} = current SKU tag lookup  
{filetype} = .png

I tried removing the expression transform and creating a script transform

```auto
def transform(self, value, quality, timestamp):
	"""
	Transform the incoming value and return a result.

	Arguments:
		self: A reference to the component this binding is configured on.
		value: The incoming value from the binding or the previous transform.
		quality: The quality code of the incoming value.
		timestamp: The timestamp of the incoming value as a java.util.Date
	"""
	import system.file
	
	
	return system.file.fileExists(self.view.params.dir + str(value) + self.view.params.filetype)

```

this returns false. I also tried

```auto
return system.file.fileExists(self.session.props.gateway.address +"/main" + self.view.params.dir + str(value) + self.view.params.filetype)

```

This also returns false even though I can browse to that file.

The desired end result is if the value.png doesn’t exist then I’ll return a default 404.png image instead.
