{"id":21396,"library":"gradio_imageslider","title":"gradio_imageslider","description":"A custom Gradio component for comparing two images via an interactive before/after slider. Current version 0.0.20. Release cadence is irregular.","status":"active","version":"0.0.20","language":"python","source_language":"en","source_url":"https://github.com/freddyaboulton/gradio-imageslider","tags":["gradio","image comparison","slider","before-after","computer vision"],"install":[{"cmd":"pip install gradio_imageslider","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required; component extends Gradio's native components.","package":"gradio","optional":false}],"imports":[{"note":"Correct import path for the component class.","symbol":"ImageSlider","correct":"from gradio_imageslider import ImageSlider"}],"quickstart":{"code":"import gradio as gr\nfrom gradio_imageslider import ImageSlider\n\nwith gr.Blocks() as demo:\n    ImageSlider(value=(\"image1.png\", \"image2.png\"), label=\"Compare\")\n\ndemo.launch()","lang":"python","description":"Minimal example showing a static before/after comparison with two images."},"warnings":[{"fix":"Upgrade to >=0.0.20 or use a Gradio 4.x state pattern.","message":"The component does not support dynamic updates via gr.update() in early releases (<=0.0.18). If you need to update images after the interface loads, consider using a ref or a workaround.","severity":"gotcha","affected_versions":"<=0.0.18"},{"fix":"Ensure value is a tuple: (\"img_left.png\", \"img_right.png\").","message":"If you pass a single string instead of a tuple, the component will fail silently. Always pass a tuple of two strings (file paths or URLs).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use: from gradio_imageslider import ImageSlider","cause":"Incorrect import (e.g., import gradio_imageslider as gis; gis.ImageSlider) or old version.","error":"AttributeError: module 'gradio_imageslider' has no attribute 'ImageSlider'"},{"fix":"Use 'value' parameter (or upgrade).","cause":"Older versions (<0.0.15) used 'images' instead of 'value'.","error":"TypeError: ImageSlider.__init__() got an unexpected keyword argument 'value'","affected_versions":"<0.0.15"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}