PHP 5는 지원이 종료되었으며 2026년 1월 31일에 지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 PHP 5 애플리케이션을 배포할 수 없습니다. 기존 PHP 5 애플리케이션은 지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다. 지원되는 최신 PHP 버전으로 마이그레이션하는 것이 좋습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThe App Engine API offers \u003ccode\u003eCloudStorageTools.getImageServingUrl()\u003c/code\u003e to generate URLs for serving images stored in Cloud Storage, and \u003ccode\u003eCloudStorageTools.deleteImageServingUrl()\u003c/code\u003e to stop serving them.\u003c/p\u003e\n"],["\u003cp\u003eUsing \u003ccode\u003egetImageServingUrl\u003c/code\u003e allows for dynamic resizing and cropping of images without needing to store multiple image sizes, offering a significant advantage over directly making files public.\u003c/p\u003e\n"],["\u003cp\u003eOnly the first app that calls \u003ccode\u003egetImageServingUrl\u003c/code\u003e can serve a specific image; subsequent apps must copy the image first if they need to serve it.\u003c/p\u003e\n"],["\u003cp\u003eSetting \u003ccode\u003esecure_url\u003c/code\u003e to \u003ccode\u003eTrue\u003c/code\u003e when using \u003ccode\u003egetImageServingUrl\u003c/code\u003e ensures the image can be displayed on HTTPS pages without mixed-content warnings.\u003c/p\u003e\n"],["\u003cp\u003eTo remove the actual file you must use the PHP \u003ccode\u003eunlink()\u003c/code\u003e function and not the \u003ccode\u003edeleteImageServingUrl\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Serving Images\n\nThe App Engine API for Cloud Storage Tools provides convenience methods\nfor serving image files:\n\n- `CloudStorageTools.getImageServingUrl()`\n- `CloudStorageTools.deleteImageServingUrl()`\n\n| This page describes how to use the legacy bundled services and APIs. This API can only run in first-generation runtimes in the App Engine standard environment. If you are updating to the App Engine PHP 7/8 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/php-differences) to learn about your migration options for legacy bundled services.\n\n\u003cbr /\u003e\n\n| **Note:** When running your app locally on the [development server](/appengine/docs/legacy/standard/php/tools/using-local-server), you'll need to install [PIL](https://python-pillow.org/) if you wish to use the image sizing options described in this page.\n\nOne advantage of using this method to serve images over simply\n[making the files public](/appengine/docs/legacy/standard/php/googlestorage/public_access) is\nthe ability to resize and crop dynamically, without needing to store the\nimages in different sizes.\n\n[CloudStorageTools::getImageServingUrl](/appengine/docs/legacy/standard/php/refdocs/classes/google.appengine.api.cloud_storage.CloudStorageTools#method_getImageServingUrl)\nreturns a serving URL for an image. If the image will be displayed within an\nHTTPS page, set `secure_url` to `True` to avoid mixed-content warnings.\n\nNotice that this URL is publicly readable by everyone, but it is not \"guessable\".\n| **Important:** You cannot serve an image from two separate apps; only the first app that calls `getImageServingUrl` can get the URL to serve it because that app has obtained ownership of the image to serve it. Any other app that calls `getImageServingUrl` on the image will therefore be unsuccessful. If a second app needs to serve the image, the app needs to first copy the image and then invoke `getImageServingUrl` on the copy.\n\nTo stop serving the URL,\ncall [CloudStorageTools::deleteImageServingUrl](/appengine/docs/legacy/standard/php/refdocs/classes/google.appengine.api.cloud_storage.CloudStorageTools#method_deleteImageServingUrl).\n| **Note:** If you want to delete the file itself, use the PHP `unlink()` function.\n\nTo use this feature, import the `CloudStorageTools` class: \n\n use google\\appengine\\api\\cloud_storage\\CloudStorageTools;\n\nNow resize and crop the image `image.jpg`: \n\n $options = ['size' =\u003e 400, 'crop' =\u003e true];\n $image_file = \"gs://${my_bucket}/image.jpg\";\n $image_url = CloudStorageTools::getImageServingUrl($image_file, $options);"]]